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.

[cdk-pipelines] cdk deploy breaks when bootstrapping with --qualifier

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
rix0rrrcommented, Aug 5, 2020

Although I could also see those values being read from context by default, so I will take this as a feature request for that.

1reaction
rix0rrrcommented, Aug 5, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

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