AWS Builder Center
AWS Transit Gateway VPC Attachments: More Subnets Do Not Mean Higher Hourly Charges

AWS Transit Gateway VPC Attachments: More Subnets Do Not Mean Higher Hourly Charges

Selecting subnets in multiple Availability Zones does not increase the hourly charge for a single Transit Gateway VPC attachment. Here is how subnet selection affects connectivity, and how Transit Gateway pricing compares with VPC peering.

Introduction

During a discussion with a customer about their AWS architecture, I realized that I had misunderstood AWS Transit Gateway (TGW) pricing. I had assumed that each subnet selected for a VPC attachment would incur a separate attachment charge.
In the console, the Subnet IDs field says:
Select the subnets in which to create the transit gateway VPC attachment.
Create Transit Gateway Attachment - Subnet IDs

I had interpreted this as creating a separately billed attachment in each selected subnet. That was my misunderstanding. 😔
The subnet selection determines which Availability Zones (AZs) are enabled for the attachment; it does not multiply the number of VPC attachments.A follow-up question about elastic network interfaces (ENIs) encouraged me to check the documentation more carefully. Here is what I learned.

What is billed?

For a standard VPC attachment, the main TGW charges are:
Charge
Billing basis
Attachment charge
Per VPC attachment per hour
(partial hours are billed as full hours)

Data processing
Per GB sent from the VPC to TGW
Selecting one subnet or three subnets in different AZs for the same VPC attachment does not change its hourly attachment charge. The attachment ENIs do not create additional TGW attachment billing units.
For a simple connection between two VPCs through one TGW, there are two VPC attachments in total - one for each VPC.
The  TGW pricing page  gives a US East (Ohio) example using $0.05 per VPC attachment-hour and $0.02 per GB processed.
Check the current rates for your Region before estimating costs.
The overall bill can also include other applicable services and data transfer charges. The discussion here focuses on ordinary VPC-to-VPC connectivity through a single TGW.

What does selecting a subnet actually do?

Transit Gateway Attachment

When you enable an AZ for a VPC attachment, you select exactly one subnet in that AZ. TGW places an ENI in that subnet.
This enables connectivity for resources in other subnets in the same AZ as well, provided the required routes and security controls are configured. Workloads do not need to reside in the attachment subnet itself.
Resources in an AZ without an attachment subnet cannot send traffic directly to TGW using a route to that TGW. Enable the AZs in which workloads need this connectivity, including AZs used for recovery.
AWS recommends enabling multiple AZs for availability. However, adding attachment subnets alone does not make an application highly available: workloads, routing, and dependencies also need an appropriate recovery design.

Use dedicated attachment subnets

Dedicated attachment subnets

 AWS design best practices  recommend dedicated subnets for TGW attachments, with a small CIDR block such as  /28 .
This separates attachment routing and network ACL management from workload subnets. AWS also recommends keeping the attachment subnets' network ACLs open in both directions and applying workload subnet ACLs according to the traffic design.

One AZ is allowed; multiple AZs are recommended

One zone subnet


A VPC attachment can be created with a subnet in just one AZ. This is a supported configuration, but it should not be confused with an application resilience recommendation.
TGW itself is a highly available Regional service. The attachment subnet selection specifies where a particular VPC connects to it. For production workloads spread across AZs, enable the relevant AZs and validate the complete failover path.
The practical question is whether the selected AZs meet your application's connectivity and availability requirements.

When is VPC peering data transfer free?

VPC Peering

VPC peering has no hourly connection charge. Data transfer over a peering connection is free when it remains within the same AZ, including across accounts. Transfers across AZs or Regions incur applicable data transfer charges.
When comparing AZs across accounts, use AZ IDs. An AZ name such as  us-east-1a  can refer to different physical AZs in some account and Region combinations. AZ IDs identify the same physical AZ consistently across accounts.
References:  VPC peering pricing  and  AZ IDs .

TGW versus VPC peering

The table below covers ordinary VPC-to-VPC traffic using private IP addresses within a single Region, through either one TGW or a direct peering connection.
Consideration
Transit Gateway
VPC peering
Hourly connection charge
Per VPC attachment
None
Same-AZ traffic
TGW data processing charges
No peering data transfer charge
Cross-AZ traffic within the Region
TGW data processing charges; no additional inter-AZ data transfer charge for this TGW traffic
Inter-AZ data transfer charges
Transitive routing
Supported with appropriate routing
Not supported
Centralized on-premises connectivity
Supports Site-to-Site VPN attachments and Direct Connect connectivity through a Direct Connect gateway
A peered VPC cannot transit through another VPC's VPN or Direct Connect connection
Connection model
Each VPC attaches to the hub
A separate peering connection for each pair that needs direct connectivity
The cross-AZ pricing distinction matters: AWS removed inter-AZ data transfer charges for private-IP traffic through TGW within the same Region, effective April 1, 2022. TGW data processing charges still apply. This does not make every other hop or service in a more complex architecture free.

How I would choose

For a small number of VPCs with straightforward connectivity needs, VPC peering can be a good fit, especially for high-volume traffic within the same AZ.
For many VPCs or centralized hybrid connectivity, TGW's hub-and-spoke model can simplify routing and operations. This is where I would consider recommending TGW, while evaluating its charges against the operational benefits.
There is no universal VPC-count threshold at which TGW becomes the better choice. Traffic patterns, segmentation, availability requirements, and the cost of operating the network all matter.
For more detail, see AWS's architecture guidance on  VPC peering  and  Transit Gateway .

Takeaways

  • Multiple subnets in a single VPC attachment do not multiply its hourly charge.
  • Enable the AZs where workloads require TGW connectivity, including recovery locations.
  • Same-AZ VPC peering traffic has no data transfer charge; TGW data processing still applies.
  • For private-IP traffic through TGW within one Region, crossing AZs does not add an inter-AZ data transfer charge.
  • Choose between TGW and peering based on both network requirements and operating costs.
The console's subnet selection led me to the wrong billing assumption. Checking the billing unit—rather than inferring it from the number of selected subnets—made the distinction clear.

Thanks for reading!
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