Easily delete Cloudformation stacks created using the AWS CDK without having to worry about removal policies or delete protection settings. This package is not intended for production environments.
- Sets all removal policies to
RemovalPolicy.DESTROY
- Disables delete protection on RDS database instances and clusters
- Disables termination protection on EC2 instances
npm i cdk-ez-cleanup
Call the ezCleanup
function on your CDK stack to apply easy cleanup settings.
ezCleanup(stack);
Alternatively, you can manually create an EzCleanupAspect
and add it to a construct's aspect list.
Aspects.of(stack).add(new EzCleanupAspect());