All posts
Cost

The hidden cost of NAT Gateways (and why your AWS bill is higher than it should be)

September 21, 20267 min read

NAT Gateways are one of the most common sources of unexpected AWS costs. Not because they're expensive in isolation — $0.045/hour per gateway is barely noticeable. The problem is the data processing charge, the cross-AZ traffic charge, and the way Kubernetes clusters silently amplify both.

The pricing most people understand

AWS charges for NAT Gateways in two ways: a per-hour charge ($0.045/hr in us-east-1, slightly higher in other regions) and a data processing charge ($0.045/GB for every gigabyte that passes through the gateway).

At first glance, this looks manageable. A NAT Gateway running 24/7 costs about $32/month in base charges. If you're passing 1TB/month through it, that's an additional $46. $78/month total — fine for most workloads.

But there's a third charge that isn't on the NAT Gateway pricing page: cross-AZ data transfer.

The charge most people miss: cross-AZ traffic

AWS charges $0.01/GB for data transferred between Availability Zones — in each direction. This applies to all cross-AZ traffic, including traffic flowing through a NAT Gateway.

Here's the scenario that catches teams by surprise: you deploy one NAT Gateway in a single AZ to save on per-hour costs. Your private subnets in other AZs route outbound internet traffic through that single NAT Gateway. The traffic crosses AZ boundaries twice — once to reach the NAT Gateway, once to return — and AWS bills you for both directions.

For a workload sending 10TB/month of outbound traffic through a single NAT Gateway from multiple AZs:

  • NAT Gateway data processing: 10TB × $0.045 = $461
  • Cross-AZ inbound to NAT GW: 10TB × $0.01 = $102
  • Cross-AZ return traffic: 10TB × $0.01 = $102
  • NAT Gateway hourly: $32
  • Total: $697/month — vs the $493 you'd expect without cross-AZ charges

The cross-AZ charges appear in Cost Explorer as DataTransfer-Regional-Bytes under EC2, not under NAT Gateway. This is why many teams don't connect them to their NAT Gateway configuration — the cost shows up in the wrong place.

Why Kubernetes makes this much worse

In a standard EKS or Kubernetes deployment, pod-to-pod traffic within the cluster doesn't use NAT Gateways — it routes directly. But outbound traffic from pods to the internet (package downloads, webhook calls, telemetry) goes through whatever NAT Gateway is associated with the node's subnet.

If your nodes are spread across three AZs and you have one NAT Gateway in us-east-1a, pods running on nodes in us-east-1b and us-east-1c send all their outbound internet traffic cross-AZ to that NAT Gateway. In a busy cluster with many pods making frequent outbound calls — S3, external APIs, container image pulls — this adds up fast.

The specific pattern that blows up costs: a large Kubernetes cluster that was initially deployed with a single NAT Gateway (correct for small scale) and never updated as the cluster grew. The cross-AZ charges grow linearly with cluster traffic but nobody notices because the cost shows up as DataTransfer-Regional-Bytes rather than anything connected to the cluster.

The S3 traffic mistake

If your workloads read or write to S3, they should not be routing that traffic through a NAT Gateway at all. S3 has a VPC endpoint (Gateway type, free) that routes S3 traffic directly over the AWS network without touching the internet. No NAT Gateway, no data processing charge, no cross-AZ charge for S3 traffic.

A workload that regularly reads 5TB/month from S3 through a NAT Gateway is spending $225/month on unnecessary data processing charges. The fix is a 10-minute change: create a VPC Gateway endpoint for S3, add it to your route tables.

The same logic applies to DynamoDB (also has a free Gateway endpoint) and to most AWS services that have Interface endpoints — though those have an hourly charge, so the math depends on traffic volume.

How to find out what you're actually spending

In AWS Cost Explorer, group by Usage Type and look for:

  • NatGateway-Bytes — the data processing charge
  • DataTransfer-Regional-Bytes — cross-AZ traffic (this is the hidden one)
  • NatGateway-Hours — per-hour charge

If DataTransfer-Regional-Bytes is more than 20% of your NatGateway-Bytes cost, you have cross-AZ NAT traffic and should evaluate deploying a NAT Gateway per AZ.

For Kubernetes clusters specifically: check the AWS VPC CNI metrics. The awscni_assigned_ip_per_cidr metric by AZ will show you how many pods are in each AZ. If your pods are spread across AZs and you have a single NAT Gateway, that's your cross-AZ traffic source.

The fix: NAT Gateway per AZ (and when it's worth it)

The standard recommendation is one NAT Gateway per AZ. This eliminates cross-AZ charges but increases per-hour costs by the number of AZs. For three AZs: $32 × 3 = $96/month vs $32 for one — an extra $64/month.

The break-even point: if your cross-AZ NAT traffic exceeds 6.4TB/month (6,400GB × $0.01 = $64), you save money running a NAT Gateway per AZ. For most production Kubernetes clusters handling significant traffic, this threshold is crossed quickly.

The calculation to run:

  1. Find your monthly DataTransfer-Regional-Bytes cost attributable to NAT Gateway traffic
  2. Compare to the additional per-hour cost of adding NAT Gateways in each AZ
  3. If cross-AZ savings exceed additional hourly costs, deploy per-AZ

The broader pattern

NAT Gateway costs are a specific example of a broader problem: AWS charges that accumulate gradually through architectural patterns that made sense at small scale but become expensive as traffic grows. The charges appear in Cost Explorer under usage types that don't obviously connect to the configuration decision that caused them.

This is why AWS cost anomalies are hard to catch manually. A $700/month NAT Gateway bill doesn't look like an anomaly — it looks like normal infrastructure costs. The anomaly is the $400 in cross-AZ charges hiding inside DataTransfer-Regional-Bytes that should be $40 if the architecture were correct.

SpikeCatcher's optimization scanner flags exactly this pattern: NAT Gateway configurations generating disproportionate data transfer costs, missing VPC endpoints for S3 and DynamoDB, and cross-AZ traffic that could be eliminated. Free 14-day trial, 5-min setup.

aws-costsnat-gatewaynetworking

Protect your AWS account — 14-day free trial

Real-time threat and cost anomaly detection. Detects credential theft, cryptomining, and runaway costs in under 15 minutes. 5-minute setup via CloudFormation.

No credit card. Cancel anytime.