Guide

Some of the largest lines on a cloud bill were never chosen on purpose. NAT gateway processing, traffic between availability zones, internet egress and log ingestion all grow with how much data moves, not with the instances you picked. Cheap machines can still produce an expensive bill.

Concept

A NAT gateway lets machines in a private network reach the internet. It charges for each gigabyte it processes, plus an hourly fee. An availability zone (AZ) is an isolated data center inside a region. Traffic between AZs is charged per gigabyte, in each direction.

The big idea

These costs are priced per gigabyte. A chatty service costs money even when every machine is small. Think of postage: you pay for each parcel, not for the truck that carries them. A service that sends a million tiny messages pays for each one.

The postage analogy has a limit. The rates change, and your provider's current price list is the source of truth. The figures below are rough, as of 2025 to 2026.

Hidden costRough rate (AWS)Fix
NAT gateway processingAbout $0.045 per GB, plus an hourly feeGateway endpoints for S3 and DynamoDB, PrivateLink, fewer NAT gateways
Cross-AZ trafficAbout $0.01 per GB each wayKeep chatty tiers in one zone
Internet or cross-region egressOften $0.08 to $0.12 per GBA CDN, compression, fewer copies
Logging ingestDollars per GB ingestedSample debug logs, filter before shipping
Observability vendorsPer host or per GBTail sampling, metric cardinality budgets
Idle load balancers, provisioned IOPSMonthly floor feesDelete unused LBs, match IOPS to measured need

Walking through two examples

Cross-AZ traffic. A service moves 50 TB a month of Redis traffic between zones.

50,000 GB x $0.02 (round trip) = about $1,000 / month

Moving each cache client into the same zone as its shard removes that line. The instance size does not change.

NAT traffic. Twenty TB a month flows through a NAT gateway.

20,000 GB x $0.045 = about $900 / month, plus the hourly gateway fee

Much of that traffic is often calls to S3 or DynamoDB. A gateway endpoint sends those calls around the NAT, and removes the processing charge.

Common mistakes

  • Sizing machines and ignoring transfer. A cheap fleet with chatty traffic can cost more than a larger one.
  • Shipping debug logs from production. Ingest is charged per gigabyte, and debug lines are most of the volume.
  • Routing S3 traffic through NAT. You pay the processing fee for traffic that never needed to leave the network.
  • Full traces on every request. Sample by default, and raise detail on errors.

Check yourself

  1. A service moves 50 TB a month between zones at $0.02 per GB. Roughly what is that per month? About $1,000, from 50,000 GB times $0.02.
  2. Why is moving clients into the same zone cheaper than buying a bigger instance? The charge is per gigabyte crossing zones. Keeping the traffic local removes the charge without changing the instance size.

Key takeaways

  • Network and log costs scale with data moved, not with instance count.
  • The usual hidden multipliers are NAT processing, cross-zone traffic and log ingest.
  • Gateway endpoints, zone-local clients and log filters remove most of these lines.

Further learning

Next, see how to attribute these costs to owners and turn them into a product metric in tagging and unit cost. For where cross-zone traffic comes from, see cloud primitives.