Skip to content

Latest commit

 

History

History

cdk-deletable-bucket

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

cloudcomponents Logo

@cloudcomponents/cdk-deletable-bucket

Build Status cdkdx typescript python

Bucket with content cleanup to allow bucket deletion when the stack will be destroyed

Install

TypeScript/JavaScript:

npm i @cloudcomponents/cdk-deletable-bucket

Python:

pip install cloudcomponents.cdk-deletable-bucket

How to use

import { Construct, Stack, StackProps } from '@aws-cdk/core';
import { DeletableBucket } from '@cloudcomponents/cdk-deletable-bucket';

export class DeletableBucketStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    new DeletableBucket(this, 'DeletableBucket', {
      bucketName: 'bucket2delete',
      forceDelete: true,
    });
  }
}

API Reference

See API.md.

Example

See more complete examples.

License

MIT