Interview Prep/Networking/Performance, Cost & Scale

How do you find what is driving a surprise NAT gateway bill?

AdvancedProductionPerformance, Cost & Scale
Answer

Enable VPC flow logs on the NAT gateway ENI, query top destinations and sources by bytes in Athena, and cross-check CloudWatch BytesOutToDestination. Typical culprits: container image pulls from the internet, S3 and DynamoDB without gateway endpoints, large logs or metrics shipped to SaaS, and package updates.

SELECT srcaddr, dstaddr, sum(bytes)/1e9 AS gb FROM vpc_flow_logs
WHERE interface_id='eni-nat123' GROUP BY 1,2 ORDER BY gb DESC LIMIT 20;
All Networking questions Roadmap: Networking for DevOps

More on Performance, Cost & Scale