NAT Gateways are dead. Long live NAT instances!
This project is an AWS CDK implementation of alterNAT which comprises a Terraform module, a User Data boot script, and a Lambda function. This project reuses the Lambda function and User Data from the original project. See the sections below to learn how these fit together.
Please refer to the upstream project README for many more details.
See src/integ.alternat.ts
to get a general idea of how to use alternat-cdk.
The Lambda function is maintained as a Docker container in the upstream project. To use alternat-cdk:
- Clone https://github.com/1debit/alternat
- Follow its instructions to build and push the container image (or do it your own way)
- Now you can use alternat-cdk as shown in
integ.alternat.ts
using the image you just built.
- At present, alternat-cdk does not implement a
NatProvider
. Instead, as shown insrc/integ.alternat.ts
, setnatGateways: 0
when instantiatingec2.Vpc
and allow alternat to manage the NAT gateways. - The alterNAT security groups are not currently managed with
Connections
. Instead, either pass the security group, or passingressCidrRanges
and/oringressSecurityGroups
in the properties. - For lack of a better way of doing it,
scripts/alternat.sh
is an exact copy of the upstream equivalent file. Ideas welcome on how to include that file in alternat-cdk without duplicating it!
This project welcomes contributions! Please submit an issue if you have an idea that you'd like to contribute. Contributors are expected to adhere to the Contributor Covenant code of conduct.