Why NAT gateways cost more than you expect
The hourly charge is small: $0.045 an hour is about $33 a month per gateway. The expensive part is data processing, $0.045 for every GB that passes through, in either direction. A 1 GB container image pulled from ECR, a log batch shipped to CloudWatch, and a Parquet file read from S3 are all charged, even though none of that traffic leaves AWS. At 20 TB a month, processing alone is over $900.
Find out what goes through your NAT gateways
In Cost Explorer, filter on usage type NatGateway-Bytes to see the monthly volume. To see where it goes,
turn on VPC Flow Logs for the NAT gateway's network interface and group the traffic by destination. Destinations in the
S3 or DynamoDB prefix lists (com.amazonaws.us-east-1.s3) can use a free gateway endpoint.
Addresses owned by other AWS services are candidates for interface endpoints.
Gateway endpoints first, interface endpoints where the traffic justifies them
A gateway endpoint for S3 is free, takes a route-table change, and works for most workloads straight away. Check bucket
policies that rely on aws:SourceIp, because traffic through an endpoint arrives from private addresses.
An interface endpoint breaks even against NAT processing at roughly 210 GB a month per AZ it is deployed in
($7.30 ÷ $0.035). Heavy ECR pulls clear that easily, and a rarely used API does not.
One NAT gateway per AZ, or fewer?
AWS recommends a NAT gateway in each AZ for resilience. If one fails, only its zone loses outbound access. That also avoids cross-AZ charges. For small, non-production VPCs a single gateway can be cheaper. Set the fix above to 1 and see where the break-even falls for your traffic.
Related
Compare storage classes with the S3 vs Google Cloud Storage cost calculator, or model internet, inter-region, and cross-AZ traffic across clouds with the cloud egress cost estimator.