cdk-s3bucket
Project description
cdk-s3bucket
Create a S3 Bucket that can be deleted completely.
Why
Sometime we just do some lab , create a S3 Bucket. Want to destroy resource , after Lab finished. But We forget delete Object in S3 Bucket first , so destroy will fail.
cdk-s3bucket can help delete object when cdk destroy , just add removalPolicy: RemovalPolicy.DESTROY property .
You never have to delete objects yourself, and the usage is almost the same as the native @aws-cdk/aws-s3.Bucket
Now Try It !!!
Sample
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk.core import App, Stack, CfnOutput, RemovalPolicy
from cdk_s3bucket import Bucket
# Create a S3 , add props "removalPolicy: RemovalPolicy.DESTROY".
bucket = Bucket(stack, "Bucket",
removal_policy=RemovalPolicy.DESTROY
)
# Get S3 Resource via bucket.s3Bucket ...
CfnOutput(stack, "BucketName", value=bucket.s3_bucket.bucket_name)
To deploy
cdk deploy --require-approval never
To destroy
cdk destroy -f
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cdk-s3bucket-0.0.3.tar.gz.
File metadata
- Download URL: cdk-s3bucket-0.0.3.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
434aaf3ca54c26161da2e066c4522fa1cbdd6c1ba9be777dfd8674a43040b869
|
|
| MD5 |
e6a47adaaab06ba26305b1e5fa6aaf70
|
|
| BLAKE2b-256 |
5c945e28d5d86977bf3418cb5e8329acce13e4a934131b897b56f5a8009f676e
|
File details
Details for the file cdk_s3bucket-0.0.3-py3-none-any.whl.
File metadata
- Download URL: cdk_s3bucket-0.0.3-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbfe7478dfe1d8efe6cc0049a0969857deddda2966f2396915c65d99e4a1fb81
|
|
| MD5 |
82c2c1bb3bf65479840d6a96c08b4702
|
|
| BLAKE2b-256 |
0771c5b660e1e8c3caf772f204d05f213cd22dac6b02651feff306e8199fec71
|