Hub-and-spoke with Transit Gateway: how do you design route tables?
AdvancedProductionVPC and Network Design
Answer
Use separate TGW route tables for segmentation instead of one flat table:
flowchart LR
Prod["Prod VPCs"] --> TGW["Transit Gateway"]
Dev["Dev VPCs"] --> TGW
Shared["Shared services VPC"] --> TGW
Egress["Egress / inspection VPC"] --> TGW
TGW --> OnPrem["Direct Connect / VPN"]
The prod route table propagates shared services, egress and on-prem, but not dev; dev does the same and cannot see prod. Shared services propagates to everyone. Disable default association and propagation on the TGW so every new attachment is placed deliberately. For inspection, enable appliance mode on the inspection VPC attachment to keep flows symmetric.
More on VPC and Network Design
Walk through a production VPC layout for a multi-tier app.BeginnerHow do you size VPC CIDRs to avoid painting yourself into a corner?IntermediateOne NAT gateway or one per AZ?BeginnerWhat are the biggest levers to reduce NAT gateway cost?IntermediateWhich VPC endpoints do you create by default in a private EKS or ECS VPC?IntermediateHow do you lock down what can go through a VPC endpoint?Advanced