I build/modify AWS stacks so infrequently that I forget how to do so every time. This is a collection of small demo projects to jog my memory.
Note that there are many more CDK example projects in aws-cdk-examples.
- requirements
- nodejs ~20
- aws cli
- aws account, with a user with cli access
npm i -g aws-cdk # install cdk
cdk bootstrap aws://ACCOUNT-NUMBER/REGION # bootstrap cdk (required once per account + region)
Resources tend to accumulate over time, due to CDK's default to retaining everything (rightly so) and manual experiments. To clean up an account, try https://github.com/rebuy-de/aws-nuke. Use the nuke-config.yml in this project as an example.