AWS in 1 Min · Episode 47

AWS Transit Gateway explained

One hub for all your networks. Watch the one-minute video, then read the details.

David Gomez1:15 video · 3 min read

"Just peer every VPC with every other." It works for three networks. It doesn't scale. Peering is one-to-one, so full connectivity between ten VPCs needs 45 connections, each with routes to maintain on both sides. Add an eleventh VPC and you add ten more. AWS Transit Gateway replaces that web with a hub.

What a transit gateway is

A transit gateway is a Regional virtual router. Each network connects to it once, through an attachment, and the gateway routes traffic between attachments. It scales with the traffic, so there is no appliance to size.

You can attach, among others:

  • VPCs. The gateway places a network interface in a subnet you choose in each Availability Zone.
  • Site-to-Site VPN connections to your offices or data centres.
  • An AWS Direct Connect gateway, for dedicated links.
  • A peering connection to another transit gateway.

A transit gateway also works across accounts. Share it with AWS Resource Access Manager, and other accounts can attach their own VPCs to it. That makes it a natural fit for organizations with many accounts.

One detail that surprises people: attaching a VPC isn't enough. Each VPC's own route tables still need a route that sends traffic for the other networks to the transit gateway.

Route tables decide who talks

The hub has its own route tables, separate from the ones in your VPCs. Each attachment is associated with exactly one of them, and that table decides where its traffic can go.

With a single default route table, every attachment can reach every other. Add more tables and you can segment the network. For example, production VPCs use one table and development VPCs use another, and the two never see each other. AWS compares this to virtual routing and forwarding (VRF) in traditional networks.

The common mistake is leaving everything on the default table. The result is one flat network where a test VPC can reach production.

Regions

A transit gateway serves one Region. To connect Regions, create a transit gateway in each and peer them. Traffic between them travels on the AWS global network, and peering attachments use static routes.

What it costs

Unlike VPC peering, a transit gateway is not free to run. You pay per attachment, per hour, plus a charge for each gigabyte the gateway processes. Rates vary by Region, so check the AWS Transit Gateway pricing page.

For two or three VPCs that simply need to talk, peering is usually cheaper. The hub earns its cost when the number of networks grows, or when you need central control, VPN or Direct Connect shared by everyone.

Where AI fits

A common pattern today is one central model service: a shared VPC that hosts model endpoints, a gateway to foundation models, or GPU capacity, run by a platform team. Many product teams need to reach it, and they shouldn't be able to reach each other through it.

Transit Gateway supports exactly this layout, which AWS documents as isolated VPCs with shared services:

  • Every team VPC attaches to the hub.
  • The team route table has a route to the shared service VPC only.
  • The shared service's route table knows the way back to every team.

Teams reach the models; they don't reach each other. Adding a team is one attachment and one association, not a new set of peering connections.

Quick recap

  • A transit gateway is a Regional hub: attach each VPC, VPN or Direct Connect once.
  • Its route tables control which attachments can talk.
  • You pay per attachment-hour and per GB; for two VPCs, peering is usually cheaper.
AWS in 1 Min #47 · 1:15

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS