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 →
- Find the talkers with VPC Flow Logs on the NAT ENI, aggregated by destination.
- 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
- Add interface endpoints for heavy users like ECR (
ecr.api,ecr.dkr), STS, CloudWatch Logs where volume justifies the hourly cost. - Cache container images in ECR (pull-through cache) instead of pulling from the internet on every node launch.
- 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.
More on Cost
The AWS bill jumped 40% this month and finance wants an explanation by tomorrow. How do you find out why?BeginnerCut EKS compute cost by 40% without hurting reliability. What's your plan?AdvancedDev and test environments run 24/7 but are used only during office hours. How do you cut that cost?BeginnerCloudWatch Logs costs more than the EC2 fleet. What do you do?IntermediateFinance asks you to buy commitments. Savings Plans or Reserved Instances, and how much?IntermediateYou want to run production workloads on Spot. How do you do it safely?Advanced