Security, cost and GPUs
Hidden network and logging costs
The line items nobody provisions on purpose, NAT gateway processing, cross-zone traffic, internet egress and log ingest, with rough rates and the arithmetic behind each one.
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 cost | Rough rate (AWS) | Fix |
|---|---|---|
| NAT gateway processing | About $0.045 per GB, plus an hourly fee | Gateway endpoints for S3 and DynamoDB, PrivateLink, fewer NAT gateways |
| Cross-AZ traffic | About $0.01 per GB each way | Keep chatty tiers in one zone |
| Internet or cross-region egress | Often $0.08 to $0.12 per GB | A CDN, compression, fewer copies |
| Logging ingest | Dollars per GB ingested | Sample debug logs, filter before shipping |
| Observability vendors | Per host or per GB | Tail sampling, metric cardinality budgets |
| Idle load balancers, provisioned IOPS | Monthly floor fees | Delete 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 / monthMoving 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 feeMuch 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
- 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.
- 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.
Related
Cloud cost and FinOps
Where cloud money goes, the levers that usually cut a bill, and how engineers own unit cost without waiting for a finance spreadsheet. Start here for the map of cost pages.
Cloud networking and VPCs
VPCs, subnets, routing, NAT, security groups and private connectivity in AWS and GCP, plus a three-AZ reference architecture and how to debug when A cannot reach B.
Observability: logs and traces
Structured logs, distributed tracing and OpenTelemetry, so you can ask new questions of a running system instead of guessing which dashboard to open.