AWS Transit Gateway vs VPC Peering vs PrivateLink
- AWS provides multiple VPC connectivity options, each designed for different network topologies and use cases.
- VPC Peering is point-to-point, Transit Gateway is a hub for many-to-many connectivity, and PrivateLink is for private service access without network exposure.
- Choice depends on number of VPCs, routing requirements, security posture, and cost.
Transit Gateway vs VPC Peering vs PrivateLink Comparison
| Feature | VPC Peering | Transit Gateway | PrivateLink |
|---|---|---|---|
| Topology | Point-to-point (1:1) | Hub-and-spoke (many:many) | Service endpoint (consumer:provider) |
| Transitive Routing | No | Yes | No (service access only) |
| Scale | 125 peering connections per VPC | 5,000 attachments per TGW | Unlimited endpoints |
| Cross-Region | Yes (inter-region peering) | Yes (inter-region peering) | Yes (with inter-region support) |
| Cross-Account | Yes | Yes (RAM sharing) | Yes |
| CIDR Overlap | Not allowed | Not allowed (per attachment) | Allowed (uses ENI in consumer VPC) |
| Network Exposure | Full VPC network visible to peer | Full VPC network via route tables | Only the service endpoint exposed |
| Bandwidth | No limit (same as inter-AZ) | Up to 50 Gbps per attachment | Up to 100 Gbps per endpoint |
| Cost | Data transfer only (no hourly charge) | Hourly per attachment + data processing | Hourly per endpoint + data processing |
| Use Case | Few VPCs, simple connectivity | Many VPCs, centralized routing, VPN/DX aggregation | Expose service privately, SaaS connectivity, zero-trust |
| Route Management | Update route tables in both VPCs | Centralized route tables on TGW | No route table changes needed |
| Security | Security groups + NACLs | Security groups + NACLs + TGW route tables | Minimum exposure (only service port) |
When to Choose Which
- Choose VPC Peering – Small number of VPCs (2-5), simple point-to-point connectivity, lowest cost, no transitive routing needed.
- Choose Transit Gateway – Many VPCs needing full mesh connectivity, centralized VPN/Direct Connect, shared services VPC, network segmentation with route tables.
- Choose PrivateLink – Expose a specific service to other accounts/VPCs without full network access, overlapping CIDRs, SaaS service consumption, zero-trust architecture.
- Combine TGW + PrivateLink – Transit Gateway for general connectivity between VPCs, PrivateLink for specific service access with minimal exposure.
AWS Certification Exam Practice Questions
- A company has 50 VPCs that all need to communicate with a shared services VPC and a centralized Direct Connect connection. Which connectivity solution scales best?
- VPC Peering (50 connections)
- Transit Gateway
- PrivateLink
- VPN to each VPC
- A SaaS provider needs to expose their service to customers in different AWS accounts without exposing their entire VPC network. The customer VPCs have overlapping CIDR ranges. Which solution works?
- VPC Peering
- Transit Gateway
- PrivateLink
- Site-to-Site VPN
- Two VPCs in the same region need connectivity. The traffic volume is minimal, cost is a priority, and no transitive routing is needed. What is the most cost-effective solution?
- Transit Gateway
- VPC Peering
- PrivateLink
- AWS Cloud WAN
- An organization needs VPC A to route traffic through VPC B to reach VPC C. Which service supports this transitive routing?
- VPC Peering
- PrivateLink
- Transit Gateway
- Internet Gateway
Related Posts
- AWS Virtual Private Cloud – VPC
- AWS VPC Peering
- AWS Direct Connect – DX
- AWS Networking & Content Delivery Services Cheat Sheet