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;
More on Performance, Cost & Scale
How do you reduce cross-AZ data transfer costs?IntermediateWhat are the main drivers of AWS network cost and how do you control each?IntermediateHow do you tune Linux network settings for a high-traffic server?IntermediateHow do you reach 100k+ concurrent connections on one proxy?AdvancedHow do you choose instance types for network-heavy workloads on AWS?IntermediateWhat is a placement group and when does it matter for networking?Intermediate