awstransit-gatewaynetworkingvpccost-optimization

Transit Gateway cost explained: attachments, data, and vs VPC peering

Transit Gateway is $0.05/hour per attachment (~$36.50/month each) + $0.02/GB. Here's why it costs more than peering, when the hub is worth it (~4-6 VPCs), and how to cut it.

The C3X Team··7 min read

Quick answer

Transit Gateway costs $0.05/hour per attachment (~$36.50/month each) + $0.02/GB processed. A 10-VPC hub is $365/month before data. It's worth that premium over VPC peering once you have more than ~4-6 VPCs that all need to reach each other, because peering is non-transitive and a full mesh becomes unmanageable. Cut cost by minimizing attachments and routing chatty traffic around the gateway.

Transit Gateway solves a real problem — connecting many VPCs without a spaghetti of peering connections — and bills for it in a way that scales with how many things you connect. The cost is predictable once you see the two meters, and the decision against VPC peering comes down to how many networks need to talk.

The two charges

  • Attachments: $0.05/hour per attachment, ~$36.50/month each. Every VPC, VPN, or Direct Connect gateway attached to the TGW counts. This is the fee that scales with your topology.
  • Data processing: $0.02 per GB flowing through the gateway, on top of any inter-AZ/inter-region transfer fees.
10 VPC attachments × $36.50/month   = $365.00/month  (before data)
+ 20 TB/month processed × $0.02/GB  = $409.60/month
                              Total ≈ $774.60/month

Transit Gateway vs VPC peering

VPC peering is free except for data transfer, but it's non-transitive: if A peers with B and B peers with C, A still can't reach C. Connecting N VPCs in a full mesh needs N×(N-1)/2 peering connections — 3 VPCs need 3, but 10 need 45, and you manage every one. Transit Gateway replaces that with hub-and-spoke: each VPC attaches once and reaches all others.

  • Few VPCs (≤4): peering is cheaper and simpler — no hub fee, no per-GB processing.
  • Many VPCs: Transit Gateway's per-attachment cost is worth the operational sanity, and is the only practical option past a handful of networks.

Keeping it down

  1. Minimize attachments. Each is $36.50/month forever. Consolidate VPCs where the separation isn't buying you anything.
  2. Peer the simple pairs. Two VPCs that only need to reach each other don't need the hub — a direct peering connection avoids both the attachment fee and the processing charge.
  3. Bypass the gateway for S3/DynamoDB. VPC endpoints keep that traffic off the TGW entirely — see the endpoint pattern, which applies here too.

FAQ

How much does AWS Transit Gateway cost?

Two charges: $0.05 per hour per attachment (~$36.50/month each) and $0.02 per GB of data processed through the gateway. A hub connecting 10 VPCs is 10 attachments = $365/month in attachment fees alone, before any data processing.

Why is Transit Gateway more expensive than VPC peering?

VPC peering has no hourly or per-attachment fee — you pay only inter-AZ/inter-region data transfer. Transit Gateway adds the $36.50/month-per-attachment hub fee plus $0.02/GB processing on top of transfer. You pay that premium for transitive routing and centralized connectivity that peering can't provide at scale.

When is Transit Gateway worth it over peering?

When you have many VPCs that all need to reach each other. VPC peering is non-transitive, so a full mesh of N VPCs needs N×(N-1)/2 peering connections — unmanageable past a handful. Transit Gateway gives a hub-and-spoke model: each VPC attaches once and reaches all others. The crossover is roughly 4-6 VPCs.

How do I reduce Transit Gateway costs?

Minimize attachments (consolidate VPCs where you can), use VPC peering for simple two-VPC connections that don't need the hub, keep cross-region replication off the gateway where a direct path exists, and add VPC endpoints so S3/DynamoDB and AWS-service traffic bypasses the gateway's per-GB processing.

Does data processing apply to all traffic?

Yes — every GB that flows through the Transit Gateway is charged $0.02/GB, on top of any inter-AZ or inter-region transfer fees. High-volume inter-VPC traffic can make the processing charge exceed the attachment fees, so routing chatty paths around the gateway matters.

How does C3X estimate Transit Gateway cost?

C3X prices the per-attachment hourly fee for an aws_transit_gateway and its attachments and treats data processing as usage-driven, so the fixed hub cost is visible before deployment and you can model data volume in c3x-usage.yml.

What to do next

The attachment fee is fixed and easy to forget across a growing network. C3X prices an aws_transit_gateway and its attachments so the hub cost is visible before you add the next VPC, and you can model data processing as usage. For the related egress picture, see AWS data transfer costs explained. The quickstart runs it in minutes.

Try C3X on your own Terraform

Free and open source. No API key required. One command to install, one command to estimate.