The "NAT Gateway – data processed" line is $9,000 a month. How do you bring it down?

IntermediateScenarioCost
Answer

Situation read → NAT charges per GB processed. Most of that traffic is usually going to AWS services (S3, ECR, DynamoDB) or Docker Hub, and doesn't need to go through NAT at all.

What I'd do →

  1. Find the talkers with VPC Flow Logs on the NAT ENI, aggregated by destination.
  2. Add a free gateway endpoint for S3 and DynamoDB; route tables send that traffic directly.
aws ec2 create-vpc-endpoint --vpc-id vpc-0abc --service-name com.amazonaws.ap-south-1.s3 \
  --route-table-ids rtb-0priv1 rtb-0priv2
  1. Add interface endpoints for heavy users like ECR (ecr.api, ecr.dkr), STS, CloudWatch Logs where volume justifies the hourly cost.
  2. Cache container images in ECR (pull-through cache) instead of pulling from the internet on every node launch.
  3. Make sure each AZ uses its own NAT gateway, so you don't also pay cross-AZ transfer.

Why → The S3 gateway endpoint alone often removes most of the bill, since image layers and backups are S3 traffic.

Interview tip → Know the difference: gateway endpoints (S3, DynamoDB) are free; interface endpoints cost per hour per AZ plus per GB.

All Real-World Interview questions Roadmap: Interview readiness

More on Cost