hi, ran the test app, but when i want to remove it...
# sst
s
hi, ran the test app, but when i want to remove it using [ npm run remove ] my S3 bucket and CloudFormation stack is not removed. I had to delete it manually in AWS . How to remove it completely?
f
Hi @Sakar, CloudFormation can’t delete a bucket if there are files in there.
You can do something like this to automatically remove the files in the bucket so CloudFormation can remove it:
Copy code
import * as cdk from "@aws-cdk/core";

new Bucket(this, "MyBucket", {
  s3Bucket: {
    removalPolicy: cdk.RemovalPolicy.DESTROY,
    autoDeleteObjects: true,
  },
});
s
Thank you frank.
f
s
Once again Thank you Frank