AWSAWS Transit GatewayNetworking

aws_ec2_transit_gateway_vpc_attachment cost estimation

Attaches a VPC to a Transit Gateway, billed ~$0.05/hour (~$36.50/month) per attachment plus the data the TGW processes for it.

An aws_ec2_transit_gateway_vpc_attachment connects a VPC to a Transit Gateway hub. Cost is ~$0.05/hour per attachment (~$36.50/month), charged continuously whether or not traffic flows, plus the Transit Gateway's per-GB data-processing charge (~$0.02/GB) for traffic crossing the attachment.

The attachment fee is the part that scales with your topology: a Transit Gateway connecting 10 VPCs has 10 attachments = ~$365/month in attachment fees alone, before any data. That per-attachment multiplication is the main Transit Gateway cost, and it's why the VPC count attached to a TGW matters as much as the data through it.

The levers: minimize attachments (consolidate VPCs where the separation isn't earning its keep), use plain VPC peering for simple two-VPC connections that don't need the hub (peering has no attachment fee), and add VPC endpoints so S3/DynamoDB and AWS-service traffic bypasses the TGW's per-GB processing.

c3x prices the attachment from its hourly fee, so each VPC's contribution to the Transit Gateway bill is visible; data processing is usage-driven.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "aws_ec2_transit_gateway_vpc_attachment" "app" {
  transit_gateway_id = aws_ec2_transit_gateway.main.id
  vpc_id             = aws_vpc.app.id
  subnet_ids         = aws_subnet.app_private[*].id

  tags = {
    Name = "app-vpc-attachment"
  }
}

Pricing dimensions

What you actually pay for when you provision aws_ec2_transit_gateway_vpc_attachment.

DimensionUnitWhat's being charged
TGW attachmentper hourPer-attachment hourly fee, charged continuously regardless of traffic. One per attached VPC.
$0.05/hour ≈ $36.50/month per attachment
Data processingper GBTransit Gateway per-GB charge for traffic crossing the attachment (~$0.02/GB). Usage-based.

Sample C3X output

One VPC attachment, 24/7 (attachment fee only; add data):

aws_ec2_transit_gateway_vpc_attachment.app
└─ TGW attachment   730 hours   $36.50
                    Monthly     $36.50

Optimization tips

Common ways to reduce aws_ec2_transit_gateway_vpc_attachment cost without changing the workload.

Minimize attachments

~$36.50/month per attachment removed

Each attachment is ~$36.50/month forever. A 10-VPC TGW is ~$365/month in attachment fees alone. Consolidate VPCs where the separation isn't buying you isolation that matters.

Peer simple pairs instead of attaching

The attachment + processing for that pair

Two VPCs that only need to reach each other don't need the TGW hub — a direct VPC peering connection has no attachment fee and no per-GB processing. Reserve the TGW for many-to-many connectivity.

Bypass the TGW for S3/DynamoDB

Per-GB processing on bypassed traffic

VPC endpoints keep S3/DynamoDB and AWS-service traffic off the Transit Gateway, avoiding its per-GB data-processing charge for that traffic.

FAQ

How is a Transit Gateway VPC attachment billed?

~$0.05/hour per attachment (~$36.50/month), charged continuously regardless of traffic, plus ~$0.02/GB for data the TGW processes across it. The attachment fee scales with how many VPCs you attach — a 10-VPC hub is ~$365/month before data.

Attachment or VPC peering?

Peering for simple two-VPC connections — it has no attachment fee or per-GB processing. Transit Gateway attachments for many-to-many, transitive connectivity where managing a full peering mesh would be unworkable.

How does c3x estimate the cost?

It prices each attachment's hourly fee, so each attached VPC's contribution to the Transit Gateway bill is visible. Data processing is usage-driven and modelled separately.

Related resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_ec2_transit_gateway_vpc_attachment.