-
Notifications
You must be signed in to change notification settings - Fork 4k
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 deploy seems to be deleting CloudFormationExecutionRole and other bootstrapped items #32819
Comments
@Sheharyar566 Good afternoon. Thanks for opening the issue. The normal command line for bootstrapping a CDK environment is specified at Bootstrap your environment for use with the AWS CDK. When we execute command like In your use case, when you are executing Please share the following:
Mentioning here just for reference, CDK bootstrap logic. Thanks, |
Thanks for the response @ashishdhingra Here's the
|
@Sheharyar566 Thanks for your response. Please refer to following resources in CDK developer guide:
The bootstrap stack is a CloudFormation stack that provisions an Amazon S3 bucket and Amazon ECR repository in the AWS environment. The AWS CDK CLI uses these resources to store synthesized templates and related assets during deployment. In other words, bootstrap stack is supposed to be only by CDK CLI, and is separate from your application stack. CDK CLI uses bootstrap stack to deploy number of application stacks. In your case, Hope it helps. I understand you are new to CDK; so I would recommend going through AWS CDK Immersion Day Workshop. Thanks, |
Describe the bug
I'm new to CDK and started working on an existing project. It's already deployed on an account, and I'm tasked with setting up a dev environment (on a different account). But for some reason, cdk deploy is failing right at the end.
By looking at the logs, it seems like when I run
cdk bootstrap stack-name
it creates a few roles, like execution role, file publishing role, two or three other roles, along with a repository. The bootstrap succeeds. After this, when I runcdk deploy
it uploads all of the lambdas, dynamo tables and all of the other stuff.But once it is done, it seems like it is trying to delete the above created roles and the repository. But the repository deletion fails saying the repository still has images and can't be deleted. The process fails. If I try to run
cdk deploy
again, it says the roles are not found or invalid (which of course don't exist now since cdk rollback for some reason deleted them).Of course, bootstrapping again fails as well, because the repository exists (as it couldn't be deleted).
For reference, I have tried with [email protected], also I tried with [email protected] (I don't know about this version but I saw it mentioned somewhere - so I thought why not)
Upon looking at the
CDK Diff
's output. Seems like cdk deploy is removing a bunch of stuff including the items created duringcdk bootstrap
. (I've omitted the items it's adding - Please do let me know if I need to add any other logs or stuff).Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
The deployment succeeds without issue
Current Behavior
Deployment seems to be deleting bootstrapped items
Reproduction Steps
I need help in figuring out how to reproduce it.
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.174.1 (build f353fc7)
Framework Version
No response
Node.js Version
20.11.0
OS
Mac OS
Language
Python
Language Version
3.13.0
Other information
No response
The text was updated successfully, but these errors were encountered: