AWS Builder Center
Transit Gateway: VPC Attachment vs. Peering Attachment

Transit Gateway: VPC Attachment vs. Peering Attachment

When working with AWS Transit Gateway, two attachment types often cause confusion: the VPC attachment and the peering attachment. Both connect resources to the TGW, but they solve different problems. Here's the difference.

Cloud Engineer

VPC Attachment

A VPC attachment connects a VPC directly to a Transit Gateway within the same region and the same account (or shared accounts via RAM in the same region).
How it works: the TGW deploys an ENI in the subnets you select from the VPC, and from there that VPC's traffic is routed through the central hub. It's the standard mechanism for multiple VPCs in a region to communicate with each other without one-to-one peering.
Key points:
  • Operates within a single region.
  • Connects a specific VPC to the TGW.
  • Supports up to the per-AZ bandwidth the TGW offers.
  • Traffic between VPCs on the same TGW is controlled with TGW route tables.

Peering Attachment

A peering attachment connects two Transit Gateways to each other, typically in different regions (inter-region), or even across different accounts.
How it works: it doesn't connect a VPC to the TGW, but one TGW to another. This lets you build a global topology where a VPC in  us-east-1  can reach a VPC in  mx-central-1  through the peering between both TGWs.
Key points:
  • Designed for inter-region (and cross-account) connectivity.
  • Connects TGW ↔ TGW, not VPC ↔ TGW.
  • Traffic travels encrypted over the AWS backbone, never touching the internet.
  • Requires static routes: the peering attachment does not propagate routes automatically; you must add them manually in each TGW's route tables.

When to use each

Use a VPC attachment when you want to integrate VPCs from the same region into a central hub: it's the basic building block of any regional hub-and-spoke architecture.
Use a peering attachment when you need to extend that architecture across multiple regions, connecting each region's TGW to achieve a global network. In practice, both combine: VPC attachments within each region and peering attachments to join the regions together.
They aren't competing alternatives, but complementary pieces. The VPC attachment solves local connectivity within a region; the peering attachment joins those regional domains into a global topology. Understanding this distinction is key to designing scalable multi-region networks with predictable routing.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article