Bucket with content cleanup to allow bucket deletion when the stack will be destroyed
npm install @cloudcomponents/cdk-deletable-bucket




> Bucket with content cleanup to allow bucket deletion when the stack will be destroyed
``bash`
npm i @cloudcomponents/cdk-deletable-bucket
Python:
`bash`
pip install cloudcomponents.cdk-deletable-bucket
`typescript
import { DeletableBucket } from '@cloudcomponents/cdk-deletable-bucket';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
export class DeletableBucketStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
new DeletableBucket(this, 'DeletableBucket', {
bucketName: 'bucket2delete',
forceDelete: true,
});
}
}
``
See API.md.
See more complete examples.