[cdk-pipelines] cdk deploy breaks when bootstrapping with --qualifier
See original GitHub issueI am bootstrapping a new environment using the following command:
cdk bootstrap --profile PROFILE_NAME --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess --qualifier=stackname-api
I see that IAM roles are created using the qualifier instead of the random default hnb659fds
.
Now when I try to deploy the stack running cdk deploy --profile PROFILE_NAME
I am getting the following error
Could not assume role in target account (did you bootstrap the environment with the right '--trust's?): User: arn:aws:sts::XXX:assumed-role/AWSReservedSSO_AdministratorAccess_XXX/SOMESTUFF is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::XXX:role/cdk-hnb659fds-deploy-role-XXX-us-east-1
Which makes sense since this role doesn’t exist. It should try and assume the role with the qualifier instead.
Environment
- CLI Version : 1.52.0
- Framework Version:
- Node.js Version: v14.4.0
- OS : MacOS
- Language (Version): JS
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Bootstrapping - AWS Cloud Development Kit (AWS CDK) v2
The qualifier is added to the name of bootstrap resources to distinguish the resources in separate bootstrap stacks. To deploy two different versions...
Read more >How to configure a custom bootstrap bucket name in cdk.json
I'm using custom CDK Qualifier and custom S3 Bucket Name for CDK Bootstrap ... Modify the default bootstrap template and deploy it yourself....
Read more >AWS CDK Bootstrapping and deployment with Qualifiers and ...
AWS CDK Bootstrapping and deployment with Qualifiers and Custom Parameters. 234 views 9 months ago. Trevor Foo. Trevor Foo. 32 subscribers.
Read more >CDK Pipelines - Go Packages
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 >Can you deploy CDKv2 stacks without the Bootstrap/Toolkit ...
After a break I've come back and am using CDK v2. However I am running into errors when running the cdk deploy command,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Although I could also see those values being read from context by default, so I will take this as a feature request for that.
If you specify a non-default qualifier, you need to supply a
DefaultStackSynthesizer
to your stack, initialized with the qualifier you used.This is a failure of documentation.