Hub and spoke networking puts one shared network account in the middle of a multi-account cloud estate. Every workload VPC attaches to a central transit gateway as a spoke, and a hub VPC provides what they all need: one path to the internet, one place to inspect it, one private DNS view. The routing decisions are made once, in a place no workload team owns.
The alternative is not chaos. It is repetition. Every account grows its own NAT gateways, its own egress rules, its own peering connections to the two accounts it happens to talk to, and within a year the answer to “what can reach production?” requires reading twelve route tables in eight accounts and hoping you found them all.
What the hub actually centralizes
#Three things, and they are worth separating because teams often adopt the topology for one of them and are surprised by the other two.
Routing. The transit gateway is a router with its own route tables. An attachment — a VPC, a VPN, a peering connection to another region — is associated with exactly one route table, which decides what that attachment can learn, and propagates its own routes into zero or more tables, which decides who learns about it. Those two verbs are the whole model, and they are where the isolation comes from.
Egress. The spokes have no internet gateway and no NAT gateway. Their default route points at the transit gateway, the hub VPC receives the traffic, and NAT gateways in the hub — one per availability zone — send it out. Return traffic comes back the same way.
Inspection. Because there is exactly one egress path, adding a firewall in front of it is a change in one account rather than a program of work across all of them. In the AWS Enterprise Baseline, egress inspection through AWS Network Firewall is built and switched off, with the price written next to the switch: roughly $865 a month for three availability zones plus $0.065 per gigabyte inspected. That is a deliberate default — the mechanism is there, and turning it on is a budget decision rather than an engineering project.
Why the spokes carry no NAT
#The cost argument is the one everybody makes first, and it is real. A NAT gateway is billed by the hour whether or not a packet crosses it — around $0.045 an hour in a typical US region, so roughly $33 a month each, before any data processing. Three availability zones of redundancy in four workload accounts is twelve gateways: about $400 a month to route nothing. Put those three gateways in the hub instead and every spoke shares them.
The control argument matters more and gets made less. When each spoke has its own path to the internet, you have as many egress points as you have accounts. Every one of them needs the same allow list, the same inspection, the same flow log destination, the same review when somebody asks which external services production talks to. That work gets done properly once, adequately twice, and not at all by the fourth account.
There is one thing to keep off the path entirely. S3 traffic from a private subnet does not need to traverse NAT at all: a gateway VPC endpoint carries it for no hourly charge and no per-gigabyte processing fee. Every spoke in the AWS Enterprise Baseline gets one. For teams whose workloads are chatty with object storage, that single endpoint is frequently a larger saving than the entire NAT consolidation.
What isolation domains actually stop
#Lateral movement is the part of an incident that turns a contained problem into a bad quarter. The attacker rarely lands where the valuable data is. They land in the thing that was easiest to reach — a build runner, a forgotten staging service, a developer sandbox with a permissive security group — and then look for a path.
The strong version of stopping that is to remove the path. Two transit gateway route tables, one per isolation domain, with the production attachment associated to one and the non-production attachments associated to the other. Neither domain propagates its routes into the other. Production and non-production do not reach each other because there is nowhere for the packets to go.
Adding an explicit blackhole route for the other domain’s range is belt and braces, and worth doing anyway, because it changes what a reviewer sees. An absent route is indistinguishable from a route somebody forgot to add. A blackhole entry is a sentence in the route table saying this separation is intentional, which is the difference between a control and an accident that happens to be correct.
This is stronger than the security group equivalent for a reason that has nothing to do with the rules themselves: it is enforced at a layer the workload accounts cannot change. A team with admin in the staging account can open every security group they own and still not reach production, because the route does not exist in a route table they have no permission on. That is the same argument that makes the account boundary the first security control, applied to the network.
| Control | Where it is enforced | Who can change it | What survives a compromised workload account |
|---|---|---|---|
| Security group | Inside the VPC | Anyone with admin in that account | Nothing; the rules are in the blast radius |
| Network ACL | Inside the VPC | Anyone with admin in that account | Nothing, for the same reason |
| Transit gateway route table | The network account | Only the network account, via the pipeline | The separation holds |
| Service control policy | The organization | Only the management account | The separation holds, and the account cannot opt out |
The cost model, said out loud
#Network topology is one of the few architectural decisions with a monthly invoice attached, so it is worth writing the arithmetic down rather than discovering it. These are AWS list prices in a typical US region at the time of writing; they vary by region and change, so confirm them against current pricing before you plan a budget.
| Component | How it is billed | What drives it |
|---|---|---|
| NAT gateway | About $0.045 per hour each, plus about $0.045 per GB processed | One per availability zone in the hub. Three zones is roughly $100 a month before any traffic |
| Transit gateway attachment | About $0.05 per hour per attachment, plus about $0.02 per GB | One per VPC. Six VPCs is roughly $220 a month before any traffic |
| Internet data transfer | Around $0.09 per GB outbound | Your actual egress; unaffected by the topology |
| Gateway VPC endpoint (S3) | No hourly charge, no processing charge | Free. Use it; it removes traffic from both meters above |
| Inter-region peering | Roughly $36 a month per peering attachment, plus per-GB transfer | Only if you run more than one region |
| Egress inspection | Roughly $865 a month for three availability zones, plus $0.065 per GB | Only when the firewall is switched on |
Two things fall out of that table. The first is that the recurring cost is mostly fixed: you pay for availability zones and attachments, not for packets, until traffic gets large. The second is that per-gigabyte charges stack. A gigabyte leaving a spoke for the internet is processed by the transit gateway, processed again by the NAT gateway, and then billed as data transfer — three meters on one byte. That is the strongest possible argument for keeping internal traffic internal with endpoints.
When a simpler topology is enough
#Honest answer: more often than the reference architectures suggest.
If you have one or two VPCs, no requirement to isolate accounts from each other, and no shared services that several teams reach across account boundaries, a single well-structured VPC with private subnets, one NAT gateway per availability zone and a disciplined set of security groups will serve you well, cost less, and be comprehensible to the next engineer you hire. Nothing about a transit gateway makes a small estate safer.
VPC peering is the middle option and it has a hard ceiling. Peering is non-transitive, so every pair of VPCs that must talk needs its own connection, and the number of connections grows with the square of the number of VPCs. It is an excellent answer for three VPCs and an unmanageable one for ten. If you know you are heading past a handful, the transit gateway is cheaper in engineering time even where it is more expensive in dollars.
The threshold that actually matters is not a VPC count. It is the first time somebody asks for a network path that crosses an account boundary in a direction nobody planned for. If that request is a change to one route table, the topology is doing its job. If it means building a new peering connection, updating four route tables and writing a runbook entry, you have already passed the point where centralizing would have paid.
What this looks like in the AWS Enterprise Baseline
#The AWS Enterprise Baseline — the AWS edition of the BuiltForProd Baseline — builds this by default. A hub VPC in the network account carries NAT gateways across three availability zones and is the only path to the internet. Four spoke VPCs, one for each of sandbox, dev, staging and production, attach to a transit gateway carrying two isolation domains, and the blackhole routes between production and non-production mean the two cannot reach each other by construction. Every VPC gets an S3 gateway endpoint, and flow logs are on across all six VPCs.
The expensive parts are built and switched off, each with its price in the comment above the switch: Network Firewall egress inspection, inter-region transit gateway peering, and AWS Client VPN for engineer access. Address allocation comes from AWS VPC IPAM against a single address map, which is the subject of IP address planning that survives growth — and the reason a fifth spoke does not require a meeting.
Those specifics describe the AWS edition. The property underneath them — one deliberate egress path, and no route between environments that must not reach each other — belongs to the BuiltForProd Standard and applies to every edition.
Where to start this week
#- Draw the egress points you have. Count the NAT gateways across every account and add up their hourly charges. The number is usually higher than anyone guesses.
- Ask what a compromised non-production workload can reach. If the answer involves reading security groups to find out, the boundary is in the wrong layer.
- Turn on flow logs everywhere, if they are not on. They cost little and they are the only way to answer the two questions above with data rather than architecture diagrams.
- Add S3 gateway endpoints. There is no reason not to, and the effect on the bill is immediate.
If the drawing takes longer than an afternoon because nobody is sure what the current state is, that is the finding, and an outside read is worth more than another diagram. The BuiltForProd Assessment measures an existing estate against the Standard and tells you which of these gaps are actually urgent — including, sometimes, that none of them are.