All guides
Practice now
D1 · Organizational Complexity

Multi-Account Networking: Transit Gateway, VPC Peering and PrivateLink

Networking questions in the SAP-C02 always involve multiple accounts and . Understanding when to use VPC Peering, Transit Gateway, PrivateLink or RAM — and their limitations — is essential for the professional-level exam.

Icon-Architecture/48/Arch_AWS-Transit-Gateway_48

Connectivity options between VPCs and accounts

ServiceTopologyTransitiveCross-accountBest for
VPC PeeringPoint-to-point (mesh)NOYes (with acceptance)Few VPCs, low volume, same region or inter-region
Transit GatewayHub-and-spokeYESYes (via RAM)Many VPCs, centralized traffic, on-premises + cloud
PrivateLinkOne-directionalN/AYes (VPC Endpoint)Exposing private services/APIs across accounts without peering
AWS RAMShared subnetsN/AYes (org or account)Sharing subnets of a central VPC with other accounts
VPN GatewaySite-to-siteWith TGWYesConnecting on-premises to a single VPC or via TGW
Direct ConnectDedicated (physical)With TGWYesHigh-performance private connectivity from on-premises
Icon-Architecture/48/Arch_Amazon-Virtual-Private-Cloud_48

VPC Peering

VPC Peering establishes a private, point-to-point network connection between two VPCs. Traffic never crosses the public internet — it stays on AWS's backbone network.

Features

  • Low latency: traffic stays on AWS's network
  • Inter-region: VPCs in different regions (data encrypted in transit)
  • Cross-account: requires acceptance from the destination VPC's owner
  • No dedicated gateway or VPN — direct connection between VPCs
  • CIDRs can't overlap between the peered VPCs
  • No extra transfer cost intra-region (same AZ)

Critical limitations

  • NOT transitive: VPC-A ↔ VPC-B ↔ VPC-C does NOT imply VPC-A ↔ VPC-C
  • Scales poorly: 100 VPCs = 4,950 peerings (n*(n-1)/2)
  • Does NOT support edge-to-edge routing (on-premises via VPC-B to VPC-A)
  • Max 125 active peerings per VPC (quota limit)
  • Manual routing: you must update route tables in both VPCs

Exam golden rule

VPC Peering is ideal for a handful of VPCs needing bidirectional communication. When the scenario mentions "dozens or hundreds of VPCs" or "communication with on-premises from multiple VPCs" → Transit Gateway.

Icon-Architecture/48/Arch_AWS-Transit-Gateway_48

AWS — hub-and-spoke at scale

Transit Gateway (TGW) is a managed regional router that acts as a central hub. Every VPC and on-premises connection attaches to the TGW, which routes traffic between them. It supports up to 5,000 attachments.

Supported attachments

  • VPCs (up to 5,000)
  • VPN connections (Site-to-Site)
  • Direct Connect Gateways
  • Other Transit Gateways (peering)
  • SD-WAN via Connect attachment

TGW route tables

  • Each TGW has one or more route tables
  • Attachments are associated with a route table
  • Enables isolation: Prod VPC can't see Dev VPC
  • Dynamic route propagation with BGP
  • Static routes for granularity

Advanced features

  • Inter-region via TGW Peering
  • Native multicast between VPCs
  • Network Manager: visual control panel for your global network
  • Appliance Mode for inline firewalls
  • Cross-account via AWS RAM

Isolation with multiple TGW route tables

The TGW lets you segment traffic with multiple route tables. It's the pattern for isolating prod from dev, or building inspection zones with security appliances.

Pattern: Prod/Dev isolation

Two route tables: one associated with Prod VPCs and another with Dev VPCs. Prod routes don't propagate to Dev and vice versa. Both can reach a Shared-Services VPC.

Pattern: inline inspection with a firewall

All E-W traffic passes through an inspection VPC running AWS Network Firewall. TGW Appliance Mode keeps flow symmetry for stateful inspection.

Icon-Architecture/48/Arch_AWS-Resource-Access-Manager_48

AWS Resource Access Manager ()

RAM lets you share AWS resources between accounts in the same organization or with external accounts. The most common networking use case is sharing subnets of a shared VPC.

Most frequently tested shareable resources:

VPC Subnets

Share from a central VPC. Member accounts deploy resources into those subnets.

Transit Gateway

Share a central TGW with multiple accounts instead of creating one TGW per account.

Route 53 Resolver Rules

Share forward/conditional DNS rules for centralized DNS resolution.

Prefix Lists

Share centrally managed CIDR lists for SGs and route tables.

Icon-Architecture/48/Arch_AWS-Direct-Connect_48

and VPN in multi-account environments

Direct Connect Gateway + TGW

To connect on-premises to multiple VPCs across multiple accounts and regions, the recommended architecture is: DX → DXGW → TGW → VPCs.

  • A single Direct Connect serves every VPC in the org
  • A DXGW can connect up to 20 TGWs across up to 3 regions
  • The TGW propagates on-premises routes to every attached VPC
  • Eliminates the need for individual VGWs (Virtual Private Gateways)

at scale with ECMP

AWS VPN with TGW supports ECMP (Equal-Cost Multi-Path) to aggregate multiple VPN tunnels and increase throughput.

  • Without ECMP: max 1.25 Gbps per VPN connection (TGW limit)
  • With ECMP: add more VPN connections → scalable throughput
  • TGW supports dynamic BGP routing for automatic failover
  • Accelerated VPN uses Global Accelerator to reduce latency
Icon-Architecture/48/Arch_AWS-Transit-Gateway_48

Decision tree: when to use what

Q1.

Do you need to connect 2–5 VPCs with full-mesh communication?

→ VPC Peering

Q2.

Do you have 10+ VPCs, or need to connect on-premises to multiple VPCs?

→ Transit Gateway

Q3.

Do you want to expose a specific microservice to other accounts without sharing the whole VPC?

→ PrivateLink

Q4.

Do you need to share subnets from a central VPC across accounts in the org?

→ AWS RAM with VPC Sharing

Q5.

Do you need dedicated private connectivity from your own datacenter to AWS?

→ Direct Connect (+ DXGW + TGW for scale)

Q6.

Do the VPC CIDRs overlap?

→ PrivateLink (VPC Peering and TGW require non-overlapping CIDRs)

Icon-Architecture/48/Arch_AWS-Transit-Gateway_48

Common exam traps

Trap: "Transit Gateway is transitive like VPC Peering"

Reality: TGW IS transitive — that's its key advantage over VPC Peering. VPC Peering is the one that is NOT transitive.

Trap: "PrivateLink requires non-overlapping CIDRs"

Reality: FALSE. PrivateLink works even with overlapping CIDRs — that's one of its main advantages over Peering.

Trap: "A single Direct Connect can connect directly to multiple VPCs in different regions without a DXGW"

Reality: FALSE. You need a Direct Connect Gateway (DXGW) to connect a DX to VPCs across multiple regions.

Trap: "RAM only works within the same organization"

Reality: RAM can also share resources with accounts outside the organization (requires manual acceptance).

Did you get this topic?

Test what you just learned

A company has 50 VPCs spread across 5 AWS accounts within an organization. Every VPC needs to communicate with the others and also reach an on-premises datacenter over an existing Direct Connect. The network team wants a centralized architecture that minimizes operational complexity. What is the most appropriate solution?

Ready to test "Multi-Account Networking: Transit Gateway, VPC Peering and PrivateLink"?

Put what you learned to the test with original SAP-C02 exam questions.

Start SAP-C02 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.