(cli): bootstrapping for CDK v2
See original GitHub issueGeneral Issue
SSM parameter /cdk-bootstrap/hnb659fds/version not found. Has the environment been bootstrapped?
The Question
I’m starting to plan upgrading to cdk v2. I noticed this error when I upgraded one of our sample apps to cdk v2:
SSM parameter /cdk-bootstrap/hnb659fds/version not found. Has the environment been bootstrapped?
We have multiple cdk apps running in the same aws account and are unable to upgrade these to cdk v2 simultaneously. I checked the https://docs.aws.amazon.com/cdk/latest/guide/work-with-cdk-v2.html guide, and while it mentions that re-bootstrapping is a required prerequisite for cdk v2, it says nothing about interop between v1 and v2 stacks. This guide: https://aws.amazon.com/about-aws/whats-new/2021/04/aws-cloud-development-kit-aws-cdk--v2-and-go-cdk-is-now-available-for-developer-preview/ mentions “…for most projects, can be accomplished with a one-time, safe re-bootstrapping of your AWS accounts” but it doesn’t specify what it’s safe from. Like, why wouldn’t it be safe?
So my question: Will cdk v2 support a mix of v1 and v2-based stacks in the same aws account? Some more documentation around this topic would be very helpful
CDK CLI Version
2.0.0-rc.30 (build 6051e07)
Framework Version
No response
Node.js Version
No response
OS
No response
Language
Python
Language Version
No response
Other information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
No problem, I’ve made the note that this should be more clear in our docs. Thank you for the feedback!
Yes - V1 based stacks support using the modern bootstrapping template, so you will still be able to deploy v1 based stacks in an account bootstrapped for v2.
To put it another way - if you
cdk bootstrap
with the modern template on the latest version of v1, and then bootstrap on v2, the second bootstrap will say that no changes have been made to the bootstrap stack