Skip to content

CDK Demo implementing an S3 Object custom resource using AWSCustomResource

License

Notifications You must be signed in to change notification settings

royby-cyberark/aws-custom-resource-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AWS Custom Resource Demo

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


Prerequisites:

  • Working python environment with pip and venv

Deploying the stack

  • 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
  • Install packages: pip install -r requirements.txt
  • Deploy: cdk deploy
  • Do epic stuff

Testing the custom resource

  • 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.

Wraping up

  • Destory the stack: cdk detroy

About

CDK Demo implementing an S3 Object custom resource using AWSCustomResource

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published