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.

Update Getting Started in Dev Guide to set removalPolicy on S3 bucket so destroy will clean it up

See original GitHub issue

Follow CDK Hello world here:

When I did the “cdk destroy” my S3 bucket was not deleted. I tried again with same result.


  • **CLI Version :1.12.0 (build 923055e)
  • **OS :Linux
  • **Language :TypeScript
  "name": "aws-cdk",
  "version": "0.1.0",
  "bin": {
    "aws-cdk": "bin/aws-cdk.js"
  "scripts": {
    "build": "tsc",
    "watch": "tsc -w",
    "test": "jest",
    "cdk": "cdk"
  "devDependencies": {
    "@aws-cdk/assert": "^1.12.0",
    "@types/jest": "^24.0.18",
    "jest": "^24.9.0",
    "ts-jest": "^24.0.2",
    "aws-cdk": "^1.12.0",
    "ts-node": "^8.1.0",
    "typescript": "~3.6.2"
  "dependencies": {
    "@aws-cdk/aws-s3": "^1.12.0",
    "@aws-cdk/core": "^1.12.0",
    "source-map-support": "^0.5.9"

Issue Analytics

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

github_iconTop GitHub Comments

ghostcommented, Dec 19, 2019

I’ve added this to the CDK Dev Guide repo.

Should get to it soon… I’ll close this one.

ghostcommented, Nov 7, 2019

We should probably set the removal policy in the Getting Started.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RemovalPolicy — AWS Cloud Development Kit 1.184.0 ...
A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it;. The stack is deleted, so...
Read more >
S3 bucket is not removed by CDK destroy - Stack Overflow
The bucket is retained due to its RetentionPolicy. From the CDK documentation on RetentionPolicy: The removal policy controls what happens ...
Read more >
How to Delete an S3 bucket on CDK destroy | bobbyhadz
To automatically delete an s3 bucket when the stack is deleted we have to first empty its contents and set its Removal Policy...
Read more >
My Study Notes on AWS Cloud Development Kit (AWS CDK)
For the first getting started, I will recommend to watch Pahud Dev's AWS CDK series of videos, or CDK Workshop to experience the...
Read more >
Creating an AWS CodePipeline Stack and troubleshooting ...
As for the removalPolicy property in the bucket creation, it is set to destroy to allow the removal of this bucket when running...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found