CDK Demo implementing an S3 Object custom resource using AWSCustomResource
WARNING! Deploying this projet will create some AWS resources. make sure you are aware of the costs and be sure to destory the stack when you are done by running cdk destory
NOTE: Make sure that you have a working aws profile which you can deploy to.
if you're not sure, follow the CDK Getting started guide
- Working python environment with pip and venv
- Clone this repo, change into the cdk dir
- Create the Python virtual env, for example
python3 -m venv .env
- Activate virtual env:
- Linux/Macos:
source .env/bin/activate
- Windows:
.env\bin\activate
- Linux/Macos:
- Install packages:
pip install -r requirements.txt
- Deploy:
cdk deploy
- Do epic stuff
- After a successful deployment, open the CloudFormation stack, resources, click on the bucket resource and open the new object, inspect its content.
- Make changes to the object_content dict in cdk_stack.py, redeploy, check the object content and versions.
- Destory the stack, destruction is successful only if your resources is also destroyed.
- Destory the stack:
cdk detroy