On this page
High availability
An Auto Scaling group of one, a static ENI and an EIP.
For HA, run natkit in an Auto Scaling group of one, with eni_id and eip_id in its user-data:
- Static ENI (
eni_id): the private route tables point at this ENI, not at an instance. The instance attaches it as device 1. - EIP (
eip_id): the instance associates it with its primary ENI, so egress keeps the same public IP across replacements.
When an instance is replaced:
- The new instance keeps retrying the ENI attachment while the old one still holds it, for up to 15 minutes.
- Once it has the ENI, it takes the EIP.
fck-nat takes the EIP first. That moves egress off the EIP while the old instance is still routing. natkit waits for the ENI first to avoid that gap.
The OpenTofu module sets up this layout.
Last updated 13 Nov 2026, 13:02 -0300.