Inter-VPC & hybrid connectivity

VPC peering vs Transit Gateway vs PrivateLink — when each wins; Direct Connect and Site-to-Site VPN for on-prem. The topology question in every senior loop.

About 30 min read3-question knowledge check

The mental model

Once you have more than one VPC — and any real organisation quickly does — you face the question of how they talk to each other and to the on-premises data centre. The naive answer is to run a cable between every pair, and for two or three VPCs that is fine. The problem is arithmetic: connecting N VPCs pairwise takes N(N-1)/2 cables. Five VPCs is ten connections; ten VPCs is forty-five; twenty VPCs is a hundred and ninety. Every one is a route table to maintain, and the mesh becomes ungovernable long before it becomes technically impossible.

The mental model is a telephone system. VPC peering is running a direct private line between two offices — perfect for two, unmanageable for fifty, and crucially not transitive (office A's line to B and B's line to C does not let A call C). Transit Gateway is a telephone exchange in the middle: every office plugs in once, and the exchange routes calls between any of them — the hub-and-spoke that replaces the mesh. PrivateLink is a completely different idea: not "connect two networks" but "expose one specific service to consumers without joining the networks at all" — like a service window in a wall, where you can hand a document through but nobody can walk into the building.

For the on-premises side, Site-to-Site VPN is an encrypted tunnel over the public internet — cheap, quick to stand up, but subject to internet weather and capped around 1.25 Gbps per tunnel. Direct Connect is a dedicated physical fibre from your data centre into AWS — consistent latency, up to 100 Gbps, no internet involved, but weeks to provision and a real monthly cost. Knowing which of these five to reach for, and the exact threshold where peering gives way to Transit Gateway, is the network-topology question in essentially every senior cloud loop.

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision