Back to feed
Dev.to
Dev.to
7/20/2026
How NAT gateway data-transfer charges can create unexpected AWS bills

How NAT gateway data-transfer charges can create unexpected AWS bills

Original: Your NAT gateway is a $30k landmine and nobody warns juniors

Short summary

A startup nearly faced a $30,000 AWS bill because a worker fetching millions of small JSON files from S3 routed traffic through a NAT gateway, which charges per gigabyte transferred. The fix was a VPC endpoint for S3, which routes traffic through private subnets at no per-byte cost. The broader lesson: before scaling any data-moving worker, trace where traffic physically goes, as cross-AZ, cross-region, and NAT-routed traffic accumulates costs invisibly until month-end billing.

  • NAT gateway per-byte charges on millions of small S3 fetches can produce five-figure bills
  • A VPC endpoint for S3 routes traffic privately, eliminating NAT data-processing fees
  • Always trace where network traffic physically goes before scaling data-intensive workers

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more