Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdk bootstrap --force does not create a bucket when the cdktoolkit-stagingbucket bucket is missing #18261

Closed
adamnovak opened this issue Jan 4, 2022 · 2 comments
Assignees
Labels
guidance Question that needs advice or information. package/tools Related to AWS CDK Tools or CLI

Comments

@adamnovak
Copy link
Contributor

As noted in the referenced comment, the CDK can be gotten into a state where the CloudFormation template exists, but the staging bucket does not. In this state, it will appear un-bootstrapped when you try to deploy stuff, but it won't be able to finish the bootstrapping process.

I would expect the --force option to force the creation of the missing bucket, but it does not. It ought to.

PLEASE HELP

I manually deleted cdktoolkit-stagingbucket-xxx and now I tried to create another project and deploy.

Its successfully bootstrapping but it fails to deploy with following error.

[100%] fail: No bucket named 'cdktoolkit-stagingbucket-xxx'. Is account {account#} bootstrapped?

And here is when I cdk bootsrap again.

⏳  Bootstrapping environment aws://{account#}/eu-west-1...
✅  Environment aws://{account#}/eu-west-1 bootstrapped (no changes).

Again when I deploy it fails with error above

Solved

Just delete CDKToolkit named cloudformation stack from that region and bootstrap again. It worked.
Never going to manually delete anything. I almost got locked out of region for CDK.

Originally posted by @apoorvmote in #986 (comment)

@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jan 4, 2022
@peterwoodworth peterwoodworth added the guidance Question that needs advice or information. label Jan 4, 2022
@peterwoodworth
Copy link
Contributor

Hey @adamnovak,

the --force option is specifically for bootstrapping a region that is already bootstrapped on a higher version. The note on the help menu says this for the description:

Always bootstrap even if it would downgrade template version [boolean] [default: false]

The functionality you desire isn't something the CDK has control over unfortunately. This is a consequence of making a call to deploy an existing stack which has drifted

@peterwoodworth peterwoodworth added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 3, 2022
@peterwoodworth peterwoodworth removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Feb 3, 2022
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

3 participants