This is a stable example. It should successfully build out of the box
This example is used for the blog post on: https://towardsthecloud.com/share-resources-across-stacks-aws-cdk
1. Clone this repository
git clone git@github.com:dannysteenman/aws-cdk-examples.git
cd aws-cdk-examples/share-resources-across-stacks
npm install
To see the Cloudformation template generated by the CDK, run cdk synth
, then check the output file in the "cdk.out" directory.
cdk synth
Deploy the stacks in the following order:
cdk deploy SharedInfraStack
cdk deploy RdsStack
Go to CloudFormaton in the console to see the stacks you've deployed in your default region.
Delete the stacks in the following order
cdk destroy SharedInfraStack
cdk destroy RdsStack