aws_ route cost estimation
A single entry in a VPC route table. Routes are free, but they point traffic at targets like NAT gateways, transit gateways, and VPC peering, and those targets plus the data transfer they carry are where the cost is.
The aws_
The reason aws_
So the same free route can carry wildly different costs depending on its target. This is one of the most common places where a small Terraform change has a large bill impact: switching a private subnet default route from an internet gateway (impossible for private subnets without a NAT) to a NAT gateway, or routing more traffic through a transit gateway than expected, can add hundreds of dollars a month in data processing.
VPC endpoints change the math in the other direction. Routing S3 and DynamoDB traffic through a gateway VPC endpoint (which uses route table entries and is itself free) keeps that traffic off the NAT gateway, avoiding the per-GB NAT data processing charge entirely. This is a classic cost optimization: add endpoint routes to bypass paid NAT throughput.
c3x reports aws_
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_route_table" "private" {
vpc_id = aws_vpc.main.id
}
# Free route, but it sends all outbound traffic through a paid NAT gateway.
resource "aws_route" "private_default" {
route_table_id = aws_route_table.private.id
destination_cidr_block = "0.0.0.0/0"
nat_gateway_id = aws_nat_gateway.main.id
}
# Free route to a free gateway endpoint that keeps S3 traffic off the NAT.
resource "aws_route" "s3_endpoint" {
route_table_id = aws_route_table.private.id
destination_prefix_list_id = aws_vpc_endpoint.s3.prefix_list_id
vpc_endpoint_id = aws_vpc_endpoint.s3.id
}Pricing dimensions
What you actually pay for when you provision aws_.
| Dimension | Unit | What's being charged |
|---|---|---|
| VPC route | free | Route table entries and routing lookups are free. Cost comes entirely from the target. $0 (free) |
| NAT gateway (common target) | per hour + per GB processed | A default route to a NAT gateway adds an hourly charge plus per-GB data processing. $0.045/hour (~$32/month) + $0.045 per GB processed |
| Transit gateway (common target) | per attachment-hour + per GB | Routing through a transit gateway bills the attachment plus per-GB data processing. $0.05 per attachment-hour + $0.02 per GB processed |
| Internet data transfer out | per GB | Traffic to the internet via an internet gateway, billed as standard egress. $0.09 per GB (first 10 TB/month, us-east-1) |
Optimization tips
Common ways to reduce aws_ cost without changing the workload.
Add gateway endpoint routes to bypass the NAT gateway
$0.045 per GB of S3/DynamoDB traffic that no longer hits NATRoute S3 and DynamoDB traffic through free gateway VPC endpoints instead of the NAT gateway. This removes NAT data processing charges for that traffic, which is often the single largest NAT cost for data-heavy workloads.
Consolidate NAT gateways where availability allows
Each NAT gateway is roughly 32 dollars per month plus processing. Pointing multiple private subnets at a shared NAT (accepting cross-AZ data transfer) can be cheaper than one NAT per AZ for low-throughput workloads. Weigh the AZ resilience trade-off.
Keep peered and cross-VPC traffic in the same AZ
Routes to VPC peering connections incur inter-AZ data transfer when the source and destination are in different zones. Aligning workloads to the same AZ across peers avoids that per-GB charge.
Audit what each 0.0.0.0/0 route targets
The default route is the highest-leverage entry. Confirm whether it points at an internet gateway, NAT gateway, or transit gateway, because that choice sets the per-GB rate for all outbound traffic from the subnet.
FAQ
Do VPC routes cost anything?
No. Creating route table entries and performing routing lookups is free. The cost comes from the target the route points at, such as a NAT gateway, transit gateway, or internet gateway, and the data transfer that flows through it.
Why can changing a single route change my bill so much?
Because the target determines the per-GB and hourly charges. Sending a subnet default route through a NAT gateway adds hourly and per-GB data processing fees, while a transit gateway adds attachment and processing fees. The route itself is free; the path it selects is what bills.
How do routes help me save money?
Routing S3 and DynamoDB traffic through a gateway VPC endpoint keeps it off the NAT gateway, avoiding the per-GB NAT data processing charge. The endpoint and its routes are free, so this is a pure saving for data-heavy private subnets.
What is the difference between aws_ route and aws_ route_ table?
aws_
Related resources
More AWS 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_.