Interview Prep/AWS/VPC and Networking

Your NAT gateway bill is $4,000 a month. How do you cut it?

IntermediateScenarioVPC and Networking
Answer

Situation read → NAT charges per hour and per GB; most heavy traffic is usually to AWS services or ECR and S3.

What I'd do →

  1. Use VPC Flow Logs or CloudWatch metric BytesOutToDestination to find top talkers
  2. Add free gateway endpoints for S3 and DynamoDB
  3. Add interface endpoints for ECR, STS, CloudWatch Logs where traffic is high, since endpoint per-GB cost is lower than NAT
  4. Keep chatty cross-AZ traffic in the same AZ as its NAT
  5. Consider NAT instances only for dev environments

Why → Most NAT spend is avoidable traffic to AWS public endpoints.

Interview tip → Mention that cross-AZ data transfer through NAT adds a second charge.

aws All AWS questions Roadmap: AWS core services

More on VPC and Networking