aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.71k stars 3.93k forks source link

aws-cdk-lib: Contradiction between CDK 2 migration guide and API reference #23880

Open robertluttrell opened 1 year ago

robertluttrell commented 1 year ago

Describe the issue

The Migrating to AWS CDK v2 guide says, "CDK v2 does not support the legacy stack synthesizer."

The API reference for CDK v2 has documentation for the legacy synthesizer with no mention of being unsupported.

I am able to deploy stacks with CDK v2 using the legacy stack synthesizer. What does "not supported" in the migration guide mean here?

Related to #23879 - redeploying after upgrading synthesizers fails on deployment when cross-stack asset dependencies exist, but a clean deploy with the legacy synthesizer works fine in this case.

Links

https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.LegacyStackSynthesizer.html

peterwoodworth commented 1 year ago

Yes, the section in the devguide that says this is inaccurate:

(CDK v2 does not support the legacy stack synthesizer.)

You can use the legacy stack synthesizer in v2. However, you cannot create a legacy bootstrap stack with v2. Thanks for pointing this out!

robertluttrell commented 1 year ago

Opened a PR to remove the statement: https://github.com/awsdocs/aws-cdk-guide/pull/446