question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(pipelines): Stages deployed via pipelines do not support renamed bootstrap stacks

See original GitHub issue

Stages deployed using pipelines do not support renamed bootstrap stacks. When a stage is synthesized for a different region or account, The /cdk-bootstrap/${Qualifier}/value SSM parameter is not used. Instead the synthesizer looks for the default bootstrap stack with the default name. Non-pipeline stage deployments support random bootstrap stack names after the CDK was updated in version 1.87.0

Reproduction Steps

  1. Deploy the bootstrap stack to target regions using StackSets or using the non-default name
  2. Do not update the context file with the bootstrap stack name
  3. Create a CDK pipeline with a stage to a different region from the current one
  4. Deploy the pipeline
  5. Failure

What did you expect to happen?

A successful deployment of the pipeline to the target account

What actually happened?

Waiting for stack CDKToolkit to finish creating or updating...
Call failed: describeStacks({"StackName":"CDKToolkit"}) => Stack with id CDKToolkit does not exist (code=ValidationError)
Stack CDKToolkit does not exist
The environment aws://123456789012/us-east-2 doesn't have the CDK toolkit stack (CDKToolkit) installed. Use cdk bootstrap "aws://123456789012/us-east-2" to setup your environment for use with the toolkit.

 ❌  cross-region-stack-123456789012:us-east-2 (pipeline-stack-support-us-east-2) failed: Error: pipeline-stack-support-us-east-2: publishing assets requires bootstrap stack version '1', no bootstrap stack found. Please run 'cdk bootstrap'.
    at CloudFormationDeployments.validateBootstrapStackVersion (C:\Users\my_user\AppData\Roaming\npm\node_modules\aws-cdk\lib\api\cloudformation-deployments.ts:286:13)
    at CloudFormationDeployments.deployStack (C:\Users\my_user\AppData\Roaming\npm\node_modules\aws-cdk\lib\api\cloudformation-deployments.ts:157:16)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at CdkToolkit.deploy (C:\Users\my_user\AppData\Roaming\npm\node_modules\aws-cdk\lib\cdk-toolkit.ts:180:24)
    at initCommandLine (C:\Users\my_user\AppData\Roaming\npm\node_modules\aws-cdk\bin\cdk.ts:204:9)
pipeline-stack-support-us-east-2: publishing assets requires bootstrap stack version '1', no bootstrap stack found. Please run 'cdk bootstrap'.
Error: pipeline-stack-support-us-east-2: publishing assets requires bootstrap stack version '1', no bootstrap stack found. Please run 'cdk bootstrap'.
    at CloudFormationDeployments.validateBootstrapStackVersion (C:\Users\my_user\AppData\Roaming\npm\node_modules\aws-cdk\lib\api\cloudformation-deployments.ts:286:13)
    at CloudFormationDeployments.deployStack (C:\Users\my_user\AppData\Roaming\npm\node_modules\aws-cdk\lib\api\cloudformation-deployments.ts:157:16)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at CdkToolkit.deploy (C:\Users\my_user\AppData\Roaming\npm\node_modules\aws-cdk\lib\cdk-toolkit.ts:180:24)
    at initCommandLine (C:\Users\my_user\AppData\Roaming\npm\node_modules\aws-cdk\bin\cdk.ts:204:9)

Environment

  • **CDK CLI Version : ** 1.87.0 (build be72c59)
  • Framework Version: ??
  • **Node.js Version: ** v12.13.0
  • OS : Windows 10 (19042.746)
  • Language (Version): TypeScript (3.9.7)

Other

The original renaming bootstrap stack feature was tracked here: #11420 and resolved here: #12594


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rix0rrrcommented, Jan 29, 2021

OOooooooooooohHhhhhh

0reactions
github-actions[bot]commented, Feb 1, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

aws-cdk/pipelines module - AWS Documentation - Amazon.com
CDK Pipelines is an opinionated construct library. It is purpose-built to deploy one or more copies of your CDK applications using CloudFormation with...
Read more >
CDK Pipelines Crash Course - martzcodes
It's what you want to deploy into a specific environment (AWS Account and Region) and can consist of multiple stacks. A Stage is...
Read more >
alpha(tool account) pipeline doesn't have permission to ...
I create those S3 buckets first with a different cloudformation stack. I have two AWS accounts, alpha 111111 and prod 222222 . And...
Read more >
CDK Cross-Account Pipelines - AWS in Plain English
This is required for CDK Pipelines and enables cross-account deployments. There are two other requirements for CDK Bootstrap that are not obvious in...
Read more >
CI/CD deployment with AWS SAM Pipeline Using GitHub ...
Change the directory to the previously created SAM project folder using cd folder-name (cd sam-pipeline). We can create a pipeline in 2 ways, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found