latest run 54 pass 0 fail 0 skipevidence →
HKB Operations: pages
HKB OperationsKnowledge space

Starred pages

Pages

Page directory · Labels · [ hides this

ADR-0008 accepted

A small hardened server for outbound traffic, not AWS's managed gateway

  • Status: Accepted
  • Date: 2026-09-30

Context

Servers on a private network sometimes need to reach the internet, for updates for example, without the internet being able to reach them. That job is called NAT. AWS sells a managed NAT Gateway, but it's billed by the hour plus every gigabyte it handles, which is a lot for an environment this size.

The alternative is to run NAT on a small server of your own. That's cheaper, and it shows the work of hardening, patching and managing a server.

Decision

Run one very small NAT server in each workload network. It's built from HKB's own hardened image, and it can only be reached through AWS's managed session tool: no SSH and no inbound rules at all.

Consequences

  • About a quarter of the cost of a scheduled NAT Gateway, and no one else's image sits at the network's chokepoint.
  • It's a single server in a single data centre, with no failover. If it fails, outbound traffic stops until it's replaced. That's the accepted availability trade-off.
  • The image must be rebuilt and rolled out on a schedule (ADR-0015).

Alternatives considered

  • NAT Gateway. Managed and highly available, at about four times the cost on this schedule.
  • A ready-made NAT image from a third party. Cheaper to build, but an unverified image at the chokepoint.
LLMs look here
  • Records D20. t4g.nano-class instance per workload VPC, AMI built with EC2 Image Builder, Session Manager only.
  • DQ-129 (2026-10-28) moved it to t4g.micro: on 512 MiB the first patch scan of each new instance locked it up for hours.
  • NAT Gateway price at the time: about $0.045 an hour plus data processing.
  • Single host, single AZ, no failover: finding F10 asked for this sentence, and step 7.12 closed F10 on it (2026-11-06).

Page information

Owner
Platform Engineering
Status
accepted From the decision record.
Generated from
docs/adr/0008-nat-instance.md
Linked from
Findings review, Decisions