This is the code supporting the AWS News Blog Post : "VPC Ingress Routing – Simplifying Integration of Third-Party Appliances"
The blog post is available at https://aws.amazon.com/blogs/aws/new-vpc-ingress-routing-simplifying-integration-of-third-party-appliances/
This sample CDK script demonstrates :
- how to create a VPC
- how to start EC2 instances with Role and UserData script
- how to attach a Ec2 instance to a VPC and a Security Groups
This code uses CDK v1, to see an example with CDK v2, check this repo
https://github.com/sebsto/cdkv2-vpc-example
npm install
to install the depenciesnpm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template