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.

Failed cdk deploy/delete actions should try to tell me why

See original GitHub issue

Deleting a “demo” stack that contains a bucket with removalPolicy: cdk.RemovalPolicy.Destroy

$ cdk destroy DemoBucketStack
...
 ❌  DemoBucketStack: destroy failed Error: The stack named DemoBucketStack is in a failed state: DELETE_FAILED (The following resource(s) failed to delete: [Bucket83908E77]. )
    at waitFor (/Users/mp/.nvm/versions/node/v10.13.0/lib/node_modules/aws-cdk/lib/api/util/cloudformation.ts:144:13)
    at process._tickCallback (internal/process/next_tick.js:68:7)
The stack named DemoBucketStack is in a failed state: DELETE_FAILED (The following resource(s) failed to delete: [Bucket83908E77]. )

Checking the CFN, I see:

The bucket you tried to delete is not empty (Service: Amazon S3; Status Code: 409; Error Code: BucketNotEmpty; ...)

The CDK toolkit should try to retrieve & display this information if an operation fails rather than relying on the user to use the aws CLI or console to discover it themselves.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rix0rrrcommented, Jan 14, 2019

It’s going to be there in the error message for the DELETE_FAILED of the bucket.

We should probably capture the resource-specific error messages and propagate them for better usability.

I’m starting to feel that this whole “deploy a CloudFormation stack and do monitoring/progress reporting etc” could be its own NPM library.

0reactions
github-actions[bot]commented, Jun 17, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting common AWS CDK issues
AWS CloudFormation cannot delete a non-empty Amazon S3 bucket. If you set an Amazon S3 bucket's removal policy to DESTROY , and it...
Read more >
AWS CDK Bootstrap Error and How To Fix It - Gerard Ketuma
Open the Cloudformation Service. Under Stacks, select the CDKToolkit stack and click on Delete . You will get a warning that deleting this ......
Read more >
CDK stack stuck in UPDATE_ROLLBACK_FAILED - How to ...
You have to go into the console > Cloudformation > Your Stack > Stack Actions > Continue Rollback to see what cannot be...
Read more >
awslabs/aws-cdk - Gitter
My attempts fails with errors about Parameters must have values, ... b/node_modules/@aws-cdk/app-delivery/lib/pipeline-deploy-stack-action.js index ...
Read more >
Peculiar AWS CloudFormation failure | by Girish Deshpande
When you run cdk deploy with this change, the stack update will fail and it falls back to UPDATE_ROLLBACK_COMPLETE state. If you look...
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