@cloudcomponents/cdk-deletable-bucket
TypeScript icon, indicating that this package has built-in type declarations

2.4.0 • Public • Published

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 { 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,
    });
  }
}

API Reference

See API.md.

Example

See more complete examples.

License

MIT

Package Sidebar

Install

npm i @cloudcomponents/cdk-deletable-bucket

Weekly Downloads

8

Version

2.4.0

License

MIT

Unpacked Size

1.2 MB

Total Files

14

Last publish

Collaborators

  • hupe1980