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

Starred pages

Pages

Page directory · Labels · [ hides this

NAT image

The NAT instance's AMI, built by EC2 Image Builder in each account and rebuilt every week, so the instance takes its updates by replacement rather than patching in place.

In Sandboxdeployed by the same pipeline as the others, with nothing of its own. The same template builds it in Dev and Prod.

Flow

NAT image flowEvery week, Sun 10:00 UTC, the EC2 Image Builder pipeline in each workload account builds a new NAT image. The recipe starts from the latest Amazon Linux 2023 arm64 image, updates the packages, applies the Amazon-managed DISA STIG component at Medium and HKB's NAT settings, then tests them. A t4g.small build instance in public subnet B does the work. The new AMI's ID goes to SSM Parameter Store, and the NAT stack launches from it at its next deploy. A lifecycle policy keeps the newest 2 images.AWS CloudEach workload accountSandbox, Dev and ProdEC2 Image Builder pipelineScheduleweekly, Sun 10:00 UTCBase: Amazon Linux 2023, arm64Update the packagesDISA STIG, Medium (Amazon-managed)NAT settings: forwarding, nftablesTest: both are in placeVolume: 10 GiB gp3, encrypted.Built whether or not a component changed.Build instancet4g.small, public subnet BAMI ID/imagebuilder/hkb/nat_ami_idNAT stacklaunches the new AMIhkb-net-image-lifecyclekeeps the newest 2The Elastic IP movesto the new instance.Legend1Request or run orderRequest / dataEvent / logAttached / governsBlueOpens its pagestarts1builds, tests2writes3next deploy4deletes older images
NAT image flowOpen full sizeClose

The numbers trace one weekly build, from the schedule to the instance that launches from it.

Configuration

SettingValue
Base imageAmazon Linux 2023, arm64, the latest Amazon-managed version
ComponentsPackage update; the Amazon-managed DISA STIG component at Medium; HKB's NAT settings (IP forwarding on, ICMP redirects off, masquerade through nftables), with a test that both are in place
Volume10 GiB gp3, encrypted
Buildt4g.small in public subnet B, no key pair, IMDSv2 only, terminated on failure, as hkb-net-image-build. Image tests on
ScheduleWeekly, Sun 10:00 UTC, outside the NAT's working hours, whether or not a component changed. The first image is built with the stack
OutputEach build writes its AMI ID to /imagebuilder/hkb/nat_ami_id in SSM; the NAT stack launches from it at its next deploy, and the Elastic IP moves to the new instance
RetentionA lifecycle policy keeps the newest 2 images and their snapshots, as hkb-net-image-lifecycle

Sources

Page information

Owner
Platform Engineering
Status
current Current: generated from the templates and records in the repository at this build.
Generated from
network/hkb-image.yaml
Linked from
ISO 27001 Statement of Applicability, Sandbox, VPC, NAT instance