Deploying legacy cdk bootstrap template on cdk version 2 #21622
-
How can i deploy the legacy cdk bootstrap template if i am on version 2 of cdk. Is there a flag in the CDK bootstrap command that can help in identifying if i need legacy template or the new template? I am trying to use legacy synthesizer with CDK V2 (Have set the @aws-cdk/core:newStyleStackSynthesis": false) |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 8 replies
-
CDK v2 doesn't support bootstrapping the legacy template: Regarding the Did you try to deploy a stack using the |
Beta Was this translation helpful? Give feedback.
-
@jumic There are no errors but i will loose the ability to save the assets as the legacy template is not available in the account. |
Beta Was this translation helpful? Give feedback.
-
Like Jumic said, you cannot deploy the legacy template with v2. There's just no way to do this. However, I'm not sure why you'd want to do this, or how this would be a blocker - if you're migrating why would you need to deploy the legacy template? You can still use the LegacyStackSynthesizer - could you expand on the issues you have with using this stack synthesizer? |
Beta Was this translation helpful? Give feedback.
-
@peterwoodworth The cdk v2 dosent offer Least privilege deployments, the roles are overly permissive. So we were trying to fall back to older method of deployment but still using v2. Is CliCredentialsStackSynthesizer an option? One of the recommendation in discussion "#19715" is to use LegacyStackSynthesizer. But how can we deploy the legacy template and store the assets in s3 if the older bootstrap template is not available? |
Beta Was this translation helpful? Give feedback.
-
@abjoshi2785 You can use your own policy if you do not want to use the default policy with full administrative privileges. You have to add |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
CliCredentialsStackSynthesizer
allows you to deploy with just CLI credentials and already existing "staging resources" (i.e. assets bucket and ecr repository). Just know that your CLI credentials must be valid for the duration of the entire deployment, and you cannot deploy using CDK pipelines this way (just like the legacy bootstrap). This is a good synthesizer to use in v2 if you wish to use the legacy template, because both of these only rely on existing staging resources and your CLI credentials to deploy