1. Introduction
Connecting VPCs in AWS is a decision most teams face early — and then revisit as their architecture grows. You have two primary options: VPC Peering, which creates a direct encrypted connection between two VPCs, and Transit Gateway, which acts as a regional hub routing traffic between many VPCs, on-premises networks, and VPN connections.
The choice matters beyond the initial setup. The wrong decision at two VPCs becomes expensive and complex to unwind at ten. This guide covers what each option actually does, where each one breaks down, how the costs compare in practice, and a clear decision framework for choosing between them.
2. Quick Summary
Here's a side-by-side comparison of the key attributes before going deeper on each:
| VPC Peering | Transit Gateway | |
|---|---|---|
| How it works | Direct encrypted link between two VPCs | Central hub routing traffic between many VPCs |
| Max VPCs per conn. | 2 (point-to-point only) | Up to 5,000 attachments per gateway |
| Routing model | Each VPC needs individual route table entries | Centralised — one route table governs all attachments |
| Transitive routing | Not supported | Supported — traffic can traverse through the hub |
| Cross-account | Supported (requires peering acceptance in target account) | Supported via Resource Access Manager (RAM) sharing |
| Cross-region | Supported (inter-region peering, higher latency + cost) | Supported via inter-region peering between TGWs |
| Data transfer cost | Free within same region (AZ-to-AZ charges still apply) | Per-GB charge on top of standard data transfer |
| Hourly cost | No hourly charge | ~$0.05/hour per attachment + $0.02/GB processed |
| Setup complexity | Low — a few CLI/console steps | Medium — gateway, attachments, route tables, RAM |
| Operational overhead | Grows non-linearly with VPC count (n² connections) | Centralised — one resource to manage regardless of VPC count |
| BGP / dynamic routing | Not supported | Supported (useful for Direct Connect / VPN integration) |
| Bandwidth limit | No hard limit — uses VPC network capacity | 50 Gbps burst per VPC attachment |
3. Key Differences Explained
Topology and transitive routing
VPC Peering is strictly point-to-point. If you peer VPC-A with VPC-B, and VPC-B with VPC-C, traffic from VPC-A cannot reach VPC-C through VPC-B. There is no transitive routing. To connect three VPCs fully, you need three peering connections. For ten VPCs, you need 45. This is the n(n-1)/2 problem — the number of connections grows quadratically with the number of VPCs.
Transit Gateway solves this with a hub-and-spoke model. Every VPC attaches to the gateway once. Traffic between any two attached VPCs flows through the hub. Adding the eleventh VPC means creating one new attachment, not ten new peering connections.
# VPC Peering: connections required for full mesh
# 2 VPCs = 1 connection
# 3 VPCs = 3 connections
# 5 VPCs = 10 connections
# 10 VPCs = 45 connections
# n VPCs = n(n-1)/2 connections
# Transit Gateway: attachments required
# 2 VPCs = 2 attachments
# 3 VPCs = 3 attachments
# 5 VPCs = 5 attachments
# 10 VPCs = 10 attachments
# n VPCs = n attachments
Routing complexity
With VPC Peering, every route must be manually added to the VPC route tables on both sides of the connection. For a three-VPC setup that's manageable. For anything larger, route table management becomes a source of outages — missing a route entry means traffic silently drops instead of routing.
Transit Gateway centralises routing. You define routes on the TGW route table and attachments propagate automatically (with BGP for VPN/Direct Connect). A security team can enforce network segmentation from one place rather than auditing dozens of individual VPC route tables.
# VPC Peering — route required in EACH VPC route table per peer
# For VPC-A to reach VPC-B (10.1.0.0/16) via peering: aws ec2 create-route \ --route-table-id rtb-xxxxxxxx \ --destination-cidr-block 10.1.0.0/16 \ --vpc-peering-connection-id pcx-xxxxxxxx
# Transit Gateway — one route entry on the TGW route table
# covers traffic to all attached VPCs: aws ec2 create-transit-gateway-route \ --destination-cidr-block 10.0.0.0/8 \ --transit-gateway-route-table-id tgw-rtb-xxxxxxxx \ --transit-gateway-attachment-id tgw-attach-xxxxxxxx
Cost model
VPC Peering within the same region has no hourly charge and no per-GB processing fee. You still pay the standard EC2 data transfer rates for cross-AZ traffic (typically $0.01/GB each way) — but the peering connection itself is free.
Transit Gateway has two cost components: an hourly charge per attachment (~$0.05/hour in us-east-1, roughly $36/month per VPC attached), and a per-GB data processing fee (~$0.02/GB). For a five-VPC setup, that's ~$180/month in attachment fees alone before a single byte of traffic flows.
Security and traffic isolation
VPC Peering creates a direct bilateral trust between two VPCs — there is no in-path filtering. Traffic flows directly between the two VPC address spaces. If you need fine-grained control over which subnets can communicate, you rely entirely on security groups and NACLs on each end.
Transit Gateway supports multiple route tables, which means you can segment traffic at the gateway level. A common pattern is to put production VPCs in one route table, development VPCs in another, and a shared-services VPC in both — without any cross-environment routing between prod and dev. This kind of segmentation is very difficult to enforce cleanly with VPC Peering alone.
On-premises and hybrid connectivity
VPC Peering only connects VPCs. It cannot be used to route traffic to on-premises networks. If you have a VPN connection or AWS Direct Connect and you want on-premises hosts to reach resources in multiple VPCs, you either need separate VPN/Direct Connect connections per VPC (expensive and complex) or a Transit Gateway.
Transit Gateway natively integrates with Site-to-Site VPN and Direct Connect Gateway. If you're running EKS across this network, configuring IRSA for fine-grained pod permissions is the recommended next step. One Transit Gateway can be the single point of entry for on-premises traffic that then routes to any attached VPC — this is the primary architectural reason many teams adopt Transit Gateway even before their VPC count makes it obvious.
4. Pros and Cons
VPC Peering
| Pros | Cons |
|---|---|
| No hourly cost — free within the same region | No transitive routing — every VPC pair needs its own connection |
| Low latency — direct VPC-to-VPC path, no intermediate hop | Scales quadratically — 10 VPCs needs 45 connections |
| Simple to set up for 2–4 VPCs | Route table management grows with every new peering |
| No bandwidth hard limit — uses full VPC network capacity | No centralised traffic segmentation or policy enforcement |
| Works cross-account and cross-region | Cannot connect to on-premises networks |
| No additional AWS service to learn or manage | Overlapping CIDR blocks between peered VPCs are not supported |
Transit Gateway
| Pros | Cons |
|---|---|
| Hub-and-spoke model scales linearly — one attachment per VPC | Per-attachment hourly cost (~$36/month per VPC) |
| Supports transitive routing between all attached VPCs | Per-GB data processing fee on all traffic |
| Centralised route tables for easy network segmentation | More complex initial setup vs peering |
| Integrates with VPN and Direct Connect for hybrid connectivity | 50 Gbps burst limit per attachment |
| Supports BGP for dynamic routing | Inter-region TGW peering has higher latency and additional cost |
| Multi-account sharing via AWS Resource Access Manager (RAM) | Overkill for simple 2–3 VPC setups |
| Easier to audit and enforce network policy at scale | One more AWS resource to monitor, update, and manage |
5. When to Use VPC Peering
VPC Peering is the right choice when:
Choose VPC Peering when...
- You have 2–4 VPCs with stable, well-defined connectivity requirements that are unlikely to grow significantly
- Cost is a hard constraint and the workload is latency-sensitive with high inter-VPC bandwidth — peering has no per-GB processing fee
- You need the lowest possible latency between two specific VPCs — peering is a direct path with no intermediate hop
- All VPCs have non-overlapping CIDR blocks (a requirement for peering in any case)
- You do not need on-premises connectivity through the VPC network — peering is VPC-to-VPC only
- You are in a simple single-account or two-account setup without complex multi-team network governance needs
- You need cross-region connectivity between two specific VPCs and cost matters more than centralised management
A common and legitimate peering use case: a single production application VPC that needs to communicate with a dedicated database VPC and a shared monitoring VPC. Three VPCs, three peering connections, stable requirements. This is a straightforward peering scenario that does not need Transit Gateway.
6. When to Use Transit Gateway
Transit Gateway is the right choice when:
Choose Transit Gateway when...
- You have 5 or more VPCs, or expect to reach that count within the next 12 months
- You need on-premises connectivity (VPN or Direct Connect) that multiple VPCs must access
- You have a shared-services VPC (DNS, monitoring, tooling) that all other VPCs must reach without individual peering connections
- You need network segmentation across environments (prod, staging, dev) enforced at the routing layer
- You are operating in a multi-account AWS organisation where central networking governance matters
- You need BGP-based dynamic routing for VPN or Direct Connect integration
- You want a single network topology resource that your security team can audit and control centrally
- You are building a platform team responsible for shared infrastructure across many product teams
A clear Transit Gateway use case: a platform team managing separate VPCs for production, staging, development, a shared-services VPC, and a security/monitoring VPC — with an on-premises data centre connected via Direct Connect. That's five VPCs today with clear paths to more. Peering would require 10 connections on day one and route table management that becomes a full-time job.
7. Final Recommendation
The decision comes down to two dimensions: how many VPCs you have (or will have), and whether you need on-premises or hybrid connectivity. If you're also dealing with EKS nodes not scheduling, the Pod Pending guide covers cross-zone volume and node affinity issues common in multi-VPC setups.
| Scenario | Recommended option | Reasoning |
|---|---|---|
| 2–4 VPCs, no on-premises | VPC Peering | Lower cost, less complexity, sufficient for simple topologies |
| 2–4 VPCs, Direct Connect or VPN | Transit Gateway | Peering cannot route on-premises traffic — TGW required |
| 5+ VPCs, any connectivity needs | Transit Gateway | Peering mesh becomes unmanageable; TGW pays for itself |
| Shared-services VPC pattern | Transit Gateway | Hub-and-spoke is purpose-built for this topology |
| Multi-account org with platform team | Transit Gateway | Centralised control and RAM sharing across accounts |
| Cost-sensitive, high bandwidth, 2 VPCs | VPC Peering | No per-GB fee makes peering significantly cheaper at scale |
| Single cross-region VPC connection | VPC Peering | Simpler and cheaper than inter-region TGW peering for one pair |
If you are just starting out and your architecture is two or three VPCs with no on-premises connectivity, start with VPC Peering. It is simpler to reason about, costs less, and is fully reversible. When your VPC count grows or you add hybrid connectivity, migrate to Transit Gateway — the operational improvement will be immediately visible.
If you are building a platform that will serve multiple teams or that you know will grow, start with Transit Gateway. The overhead of setting it up correctly once is far lower than migrating from a peering mesh later.
8. Summary
VPC Peering is direct, cheap, and simple — but it doesn't scale and can't reach on-premises networks. Transit Gateway scales cleanly, supports hybrid connectivity, and enables centralised network governance, but costs more and requires more upfront setup.
| The one-line version | |
|---|---|
| VPC Peering | Two VPCs, same region, no on-premises, cost matters → start here |
| Transit Gateway | Multiple VPCs, hybrid connectivity, or multi-account → the right long-term foundation |
The most expensive outcome is choosing VPC Peering for a growing multi-VPC architecture and having to unwind it later — updating dozens of route tables, recreating security group rules, and re-testing connectivity while trying to avoid downtime. If there is meaningful uncertainty about future growth, Transit Gateway is the safer bet.