Skip to main content

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

Project description

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file cloudcomponents.cdk-deletable-bucket-2.4.0.tar.gz.

File metadata

File hashes

Hashes for cloudcomponents.cdk-deletable-bucket-2.4.0.tar.gz
Algorithm Hash digest
SHA256 7ffa45449476327918293539ace359ce7cac9177428cc7ce5652f6acc461c002
MD5 5530a7667ae2a35c2c030760c098e82c
BLAKE2b-256 332224323096ecd4921db6ef34989df1698809c37c4e9f81edd1d23c1e757df6

See more details on using hashes here.

File details

Details for the file cloudcomponents.cdk_deletable_bucket-2.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudcomponents.cdk_deletable_bucket-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34aaeac5ca6bdf75e7070ee7ae60c9e2bc9fad1dfad645cd7be0ebcf162b27bf
MD5 cfb89a064247614b9f6e01eb9c1b6e7f
BLAKE2b-256 777c455181ad654041f3c223bb24a2f93b3602bf5602970bcebba199f766a0bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page