This is a simple private VPC written in the GoLang AWS CDK. It has only private subnets with egress, but it does not provision a NAT. Instead it provisions Gateway interfaces to lower cost while prototyping resources that must have a VPC (such as Fargate) but don't need to have egress to the internet at large.
Please note that VPC Endpoints are low cost but are NOT free
You will need to install the following for your machine
- AWS Cli
- You must configure your machine for development with AWS
- GoLang
- NodeJS
- I personally find the fnm project to be reliable and portable node version manager
- Alternatively nvm is popular
- Just (optional)
- A language agnostic command runner
The primary commands are straight forward
$ just bootstrap
- This is necessary the first time you use the CDK with your AWS account
- It is only needed once, you don't need to run it ever again
$ just deploy
- Will synthesize the CloudFormation template and deploy it to your account
$ just destroy
- Will tear down and delete all the resources created when you deployed
- Be sure to do this when you no longer need your VPC, the VPC Endpoints will incur costs
$ just test
- Validates a VPC will be created
- Validates all subnets are private with egress
$ just synth
- Useful if you are curious about or want to debug the rendered CloudFormation template.