Connect 30 VPCs across 10 accounts with shared on-prem connectivity. VPC peering or Transit Gateway?
IntermediateScenarioVPC and Networking
Answer
Situation read → Peering is non-transitive and creates a mesh; TGW is a hub with route tables.
What I'd do →
- Create a TGW in the network account and share it with RAM across the org
- Attach each VPC and the VPN or Direct Connect gateway
- Use separate TGW route tables to segment prod from dev
- Add VPC route
10.0.0.0/8 -> tgw-0abcand test with Reachability Analyzer
Why → Peering scales as n squared; TGW scales linearly and supports central egress and inspection.
Interview tip → Know the TGW cost: per attachment per hour plus per GB.
More on VPC and Networking
What is a VPC and what are the CIDR constraints?BeginnerWhat makes a subnet public or private?BeginnerHow do route tables work, including the local route and longest-prefix match?IntermediateInternet Gateway vs NAT Gateway: what does each do?BeginnerNAT Gateway vs NAT instance?IntermediateSecurity group vs network ACL: compare them.Beginner