Step X: Cleanup - solargis/cdk-workshop GitHub Wiki

Delete CloudFormation stack

Destroy stack using CDK

cdk destroy

Alternatively delete stack in AWS Console

Open AWS Console:

  • go to Services > CloudFormation
  • select stack and click "Delete" button

Delete S3 buckets

S3 buckets with content are not deleted automatically on CloudFormation stack delete, we need to delete them separately

Delete S3 buckets using AWS CLI:

aws s3 ls   (to find buckets: imagebucket and webbucket)
aws s3 rb --force s3://cdk-workshop-userXY-imagebucketXXXXXXXX-XXXXXXXXXXXX
aws s3 rb --force s3://cdk-workshop-userXY-webbucketYYYYYYYY-YYYYYYYYYYYY

Or delete S3 buckets manually in AWS Console:

  • go to Services > S3
  • open bucket
  • select all items, click Actions > Delete
  • go back to bucket list
  • select bucket and click "Delete" button