Interview Prep/AWS/VPC and Networking

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 →

  1. Create a TGW in the network account and share it with RAM across the org
  2. Attach each VPC and the VPN or Direct Connect gateway
  3. Use separate TGW route tables to segment prod from dev
  4. Add VPC route 10.0.0.0/8 -> tgw-0abc and 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.

aws All AWS questions Roadmap: AWS core services

More on VPC and Networking