Update Getting Started in Dev Guide to set removalPolicy on S3 bucket so destroy will clean it up
See original GitHub issueFollow CDK Hello world here: https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html
When I did the “cdk destroy” my S3 bucket was not deleted. I tried again with same result.
Environment
- **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:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve added this to the CDK Dev Guide repo. https://github.com/awsdocs/aws-cdk-guide/issues/159
Should get to it soon… I’ll close this one.
We should probably set the removal policy in the Getting Started.