4 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
The article recounts a costly mistake involving AWS NAT Gateways and data transfer fees due to a missing VPC Endpoint for S3. After a surprise $1,000 bill, the author explains how to implement VPC Gateway Endpoints to prevent similar charges in the future.
If you do, here's more
Mathias Hansen shares a costly lesson learned while working with AWS, specifically regarding VPC networking and NAT Gateways. After moving large geographic datasets to Amazon S3, he faced an unexpected bill of over $1,000 due to data transfer costs associated with the NAT Gateway. Although he confirmed that EC2-to-S3 transfers are typically free, the traffic was routed through the NAT Gateway, incurring charges of $0.045 per GB. This oversight led to a staggering 20,167.32 GB of data transfers in just one day.
Hansen discovered that using a VPC Gateway Endpoint for S3 could have avoided these charges entirely. Gateway Endpoints allow direct communication between a VPC and S3 without going through the NAT Gateway, and they come with no associated costs. After resolving the issue by implementing the Gateway Endpoint through Terraform, Hansen noted the importance of AWS Cost Anomaly Detection, which alerted him to the spike in costs early on. He emphasizes the complexity of AWS networking and urges others to validate their assumptions, set up anomaly detection, and ensure they are using Gateway Endpoints to prevent similar financial surprises.
Questions about this article
No questions yet.