AWS Transit Gateway acts as a cloud router, connecting thousands of VPCs and on-premises networks through a single gateway. It simplifies network topology by replacing complex VPC peering meshes.
Transit Gateway is built for scale, but the defaults shape your design:
The route table quota deserves emphasis because it is the one that encodes security intent: twenty routing domains is plenty for most organizations, but only if you plan them, and requesting an increase mid-migration is a sign the segmentation model was never designed.
The classic misconfiguration is the accidental full mesh. Transit Gateway segmentation is entirely a routing construct: if every attachment is associated with the same route table and every attachment propagates its routes into that same table, then every VPC can reach every other VPC. Teams migrate off VPC peering, attach production, development, and a partner-facing VPC to one transit gateway with a single shared route table, and believe they have "segmentation" because the VPCs are separate. They do not. A compromised development instance now has a routed path to production databases, subject only to security groups, which are often loose inside "internal" networks.
The fix is deliberate route table design: separate route tables per trust zone, associations that reflect who may initiate traffic, propagations limited to what each zone must reach, and blackhole routes for CIDRs that must never be reachable. Then verify the data plane matches the intent, because a diagram is not a control.
Use the route search API to inspect effective routes in a given transit gateway route table:
aws ec2 search-transit-gateway-routes --transit-gateway-route-table-id tgw-rtb-0123456789abcdef0 --filters "Name=state,Values=active"
The output lists each destination CIDR with the attachment it forwards to, including the resource type (vpc, vpn, direct-connect-gateway, peering, connect). Run it against the route table associated with your least-trusted zone and confirm no route points at a production VPC attachment. Swap the filter to Name=state,Values=blackhole to confirm your deny routes are present, or use Name=type,Values=static to review manually created routes that tend to outlive their purpose.
When should I use Transit Gateway instead of VPC peering?
Peering is fine for a handful of VPCs with simple, stable relationships. Once you pass roughly a dozen VPCs, need centralized inspection, or want hub-and-spoke reachability to on-premises networks, the peering mesh becomes unmanageable (peering is also non-transitive, so every pair needs its own connection). Transit Gateway gives you transitive routing with central control, at a per-attachment and data processing cost.
Does Transit Gateway inspect traffic?
No. It routes. If you need inspection, build the inspection VPC pattern: route inter-VPC traffic through a dedicated VPC containing AWS Network Firewall or third-party appliances, using route tables to force the traffic through it. Transit Gateway flow logs give you visibility, not filtering.
How many route tables should I create?
One per trust zone, not one per VPC. A common working set is: production, non-production, shared services, on-premises, and inspection. That is five of your default twenty, leaves room to grow, and keeps the association and propagation matrix small enough that humans can review it.
An isolated virtual network within AWS where you launch resources, with full control over IP addressing, subnets, route tables, and network gateways.
Dividing a network into isolated segments (subnets, VPCs) to limit lateral movement and contain the blast radius of a security breach.
A technology that provides private connectivity between VPCs, AWS services, and on-premises networks without exposing traffic to the public internet.
Toc Consulting: AWS Security & Cloud Architecture
Our team helps engineering teams secure and architect AWS the right way: assessment in week one, a prioritized action plan in week two.