Overview
natkit is a NAT instance AMI for AWS, built for arm64 and x86_64. It has fck-nat’s features on LinuxKit instead of Amazon Linux, systemd and Packer. The OS is an immutable in-memory image:
- a minimal kernel from lk-kernel;
- containerd;
- a handful of service containers.
There’s no package manager, SSH or SSM agent. natkit and fck-nat maps one onto the other.
What it does
- Masquerades the private subnets’ IPv4 traffic out of its public interface, and translates
64:ff9b::/96for IPv6-only subnets (NAT64). - High availability: an Auto Scaling group of one, a static ENI the route tables point at, and an EIP. A replacement goes into service only once it has set itself up.
- Publishes EC2’s connection-tracking allowance to CloudWatch, without an agent, for an alarm.
- Runs on 0.5 GiB of memory: a
t4g.nanowith its EIP is $6.80 a month in US East (Costs).
Ways to run it
- Get the AMI into your account.
- Deploy it:
- with the OpenTofu module, which sets up the high-availability layout, its role and the alarm, also next to the VPC module;
- or by hand: one instance, or an Auto Scaling group of your own.
- Upgrade the module and the AMI together, from the same release.
Last updated on