AWS Reference Platform

Architecture reference
a governed multi-account platform, built in layers.

One forkable Terraform codebase across five AWS accounts: an organization with guardrails, a tamper-resistant audit backbone, centralized-egress networking, and a Kubernetes platform. This page maps the whole thing, then walks the flows that make it work. Nothing stores a long-lived credential.

5Accounts
3Org OUs
10TF stacks
0Stored creds
1 -clickTeardown
01

The Layered Build

Layer 0 is the foundation; every layer above depends on the one below. Status is encoded in form: solid is live, amber is the foundation increment, dashed is planned.

5
Architecture & FinOps

Documentation Layer

Decision log, threat model, and cost dashboard: the evidence the platform works.

Planned
ADR logThreat modelFinOps dashboard
4
Sample Workload

A Real App On The Platform

A fictional fishing-charter booking SaaS: proof the platform hosts genuine product, not just infrastructure.

Planned
Charter SaaSData pipelineBedrock RAG
3
GPU / AI Serving

Accelerated Inference

GPU capacity and model serving layered onto the cluster for AI/ML workloads.

Planned
GPU OperatorMIGvLLM
2
EKS platform · workloads-dev

Kubernetes Cluster

EKS 1.35 with API access entries, Pod Identity, KMS-encrypted secrets, IMDSv2 + encrypted-EBS spot nodes. ArgoCD delivers the platform by GitOps: Karpenter autoscaling, Prometheus/Grafana, and Kyverno policy all ship as Applications. Rebuildable from code to near-zero idle cost.

Foundation + GitOps Live
EKS 1.35Spot nodesAccess entriesPod IdentityArgoCDKarpenterPrometheus/GrafanaKyvernoCiliumBackstage
1
Landing Zone

Security, Audit & Networking Backbone

The shared spine every workload inherits: identity, an immutable audit trail, org-wide threat detection, CI/CD identity, and centralized-egress networking.

Live
Identity Center SSOOrg CloudTrailAWS Config + aggregatorGuardDutySecurity HubAccess AnalyzerTransit Gateway hub3-AZ VPCs + flow logsOIDC deploy roles + ECR
0
Org Bootstrap

The Foundation

The organization itself: accounts, OUs, guardrail SCPs, the Terraform state backend, and GitHub OIDC. Everything above is built on this.

Live
Accounts + OUsS3 state backendGitHub OIDCSCP: deny-rootSCP: region-lockSCP: deny-disable-audit
02

Credential Flow: How CI Reaches AWS With Zero Secrets

A GitHub Action never holds an AWS key. It trades a short-lived OIDC token for a role, then hops one more role into the target account. Every step is logged; nothing outlives the run.

GitHub
workflow runterraform-plan / lifecyclerequests an OIDC token from GitHub's IdP
OIDC JWT
no secrets
sub: repo:owner@id/
repo@id
AWS · management
stsAssumeRoleWithWebIdentitytrust: aud=sts.amazonaws.com + exact repo subject
iam rolerefplatform-github-actionsfederated, session-capped to 1h
sts:AssumeRole
AWS · member account
iam roleOrganizationAccountAccessRoleassumed per target account
terraformplan / applyVPC, EKS, IAM, ... in workloads-dev

No IAM users, no access keys. The only stored value is the state-bucket name, kept as a masked repo secret so the account ID never lands in a public log.

Immutable-ID Subject

The trust matches repo:owner@<id>/repo@<id>, so a renamed or namespace-reused repo cannot impersonate this one.

Two-Hop, Least Standing Power

The federated role holds no keys; member-account access is a second deliberate assume-role, not a standing grant.

Fork-Safe CI

fmt/validate run for any PR with no credentials; the real cloud plan runs only for same-repo PRs.

03

Audit Trail: Every Account, One Write-Isolated Archive

All five accounts feed a single audit backbone owned by the security account. A workload-account compromise cannot reach or tamper with the evidence, and an SCP stops anyone turning it off.

All accounts
emit continuously
managementsecurityshared-servicesworkloads-devworkloads-prod
CloudTrail events · Config items · GuardDuty findings · VPC flow logs
org trail
(defined in mgmt)
KMS + validation
Security account · the archive
s3 + kmsCloudTrail log archivelog-file validation, TLS-only, Object-Lock-ready, force_destroy off
configOrg aggregatorall accounts, all regions
delegated adminGuardDuty · Security Hub · Access Analyzerorg-wide detection, administered here not in mgmt

Separation of duties. Audit data lives in a low-privilege account, separate from where workloads run. The org CloudTrail is defined in the management account (org trails must originate there) but writes only to this bucket.

SCP: Deny-Disable-Audit

No workload role, SSO human, or compromised credential can stop CloudTrail or Config, or delete a detector. Only the IaC path is exempt.

Immutable Evidence

Versioned, TLS-only, non-destroyable, and Object-Lock-ready so historical logs cannot be altered or deleted.

Delegated Administration

Detection services are administered from the security account, keeping the management account minimal.

04

Networking: Centralized-Egress Hub And Spoke

Workload VPCs carry no NAT. They default-route to a Transit Gateway, which sends egress through one shared VPC. Dev and prod share the path but have no route to each other.

Spokes · workloads
vpc · no NATworkloads-devprivate subnets, 0.0.0.0/0 → TGW
vpc · no NATworkloads-prodprivate subnets, 0.0.0.0/0 → TGW
attachments
no dev↔prod route
Hub · shared-services
transit gatewayEgress hubworkloads route table → egress VPC only
Egress VPC
nat + igwNAT → Internetone egress footprint for the org

One egress footprint, hard isolation. Centralizing NAT in a single VPC keeps cost and inspection in one place; the TGW route tables ensure dev and prod can reach the internet but never each other.

Flow Logs To The Archive

Every VPC ships flow logs (all traffic) to the security account's KMS-encrypted store, wired into the same audit backbone.

Cost Lever

NAT is the largest idle cost. Per-AZ NAT gives HA; a single NAT is a documented dev-cheap option.

EKS-Ready Subnets

Private subnets are sized and tagged for Kubernetes, so the cluster and load balancers discover them with no retagging.

05

EKS Cluster Internals

Inside refplatform-dev: modern auth via access entries (no aws-auth configmap), workload identity via Pod Identity (no node-role sharing), encrypted control plane and nodes.

Who can administer
ssoAdministrator role
ci/cdgithub-actions-deploy
access entries
(API auth mode)
ClusterAdmin
refplatform-dev · EKS 1.35
control planeAPI serverprivate + IP-restricted public, secrets KMS-encrypted, control-plane logs on
managed node groupSystem tier · spotIMDSv2 required, encrypted EBS, SSM (no SSH)
add-onsVPC CNI · CoreDNS · kube-proxy · Pod Identity agent
Pod Identity
scoped IAM
Workload identity
pod → iamAWS serviceseach pod gets its own role, not the node's

Modern EKS throughout. Identities are granted with access entries instead of the legacy aws-auth ConfigMap, and workloads get least-privilege IAM through Pod Identity rather than sharing the node instance role.

Private-First Endpoint

Private access is always on; public is restricted to an admin CIDR and forbidden from being 0.0.0.0/0. Prod goes fully private.

Cheap By Default

Spot capacity across several instance types, one-click teardown, and standard-support version to avoid the 6x extended-support rate.

GitOps-Delivered

ArgoCD app-of-apps drives the platform from Git: Karpenter (spot autoscaling), kube-prometheus-stack (metrics + Grafana), and Kyverno (admission policy) are live increments; Cilium and Backstage are next.

Defense In Depth

Org SCPs, permission boundaries on every privileged principal, a Config conformance pack attesting the controls, and Kyverno at the admission gate, layered from the org root down to the pod.

//

Principles At Every Layer

[ 01 ] Zero stored AWS credentials

SSO for humans, OIDC for CI, Pod Identity for workloads. No IAM users, no access keys, nowhere. Application secrets, where a workload truly needs one, live in Secrets Manager and are fetched over Pod Identity.

[ 02 ] Tamper-resistant audit

Validated org CloudTrail isolated in the security account, an SCP that forbids disabling it, and TLS-only, non-destroyable buckets.

[ 03 ] Cheap & destroyable

Spot capacity, per-flag paid services, one-click teardown/rebuild, and $50-increment budget alarms. Idle cost trends to near-zero.