THE SHORT ANSWER
AWS charges $0.045/hour plus $0.045 per GB processed through a NAT Gateway. Internal traffic to AWS services like S3 or DynamoDB routed through NAT Gateway incurs this processing fee, whereas Gateway VPC Endpoints route directly over the AWS private backbone for $0.00.
Engineering Handbook & Failure Dynamics
1. Underlying Mechanism
Private subnets require internet access for package updates and third-party APIs via AWS NAT Gateways. However, by default, requests to AWS S3, ECR, and DynamoDB also pass through the NAT Gateway route (`0.0.0.0/0`), paying $0.045/GB. Creating a free Gateway VPC Endpoint for S3 and DynamoDB injects prefix-list routes into the VPC Route Table, directing all storage/database traffic over AWS internal fiber at zero cost.
2. Appropriate Use Context
Mandatory for any AWS VPC running Kubernetes (EKS), container clusters, or EC2 fleets that read/write data to Amazon S3, pull images from Amazon ECR, or query DynamoDB.
3. Production Failure Modes
A data pipeline runs daily Spark batch jobs downloading 100 TB of raw data from S3 to private EKS nodes via a NAT Gateway. At $0.045/GB, the company incurs an unexpected $4,500/day ($135,000/month) in pure NAT data processing fees that could have been completely free.
4. Diagnostic Signals & Telemetry
1. AWS Cost Explorer shows `NatGateway-Bytes` as a top 3 infrastructure line item. 2. VPC Flow Logs indicate destination IPs belonging to Amazon S3 public ranges going through NAT eni interfaces. 3. Missing Gateway VPC Endpoint in VPC console.
5. Prevention & Safeguards
1. Add Terraform/CloudFormation templates creating `aws_vpc_endpoint` with type `Gateway` for `com.amazonaws.<region>.s3` and `dynamodb` across all route tables. 2. For non-production dev VPCs, consolidate multi-AZ NAT Gateways into a single shared NAT Gateway to eliminate idle hourly port charges.
6. Architectural Trade-offs
Zero trade-off for Gateway Endpoints (100% free with lower latency). Interface Endpoints (PrivateLink) have a small hourly fee ($0.01/hr) and $0.01/GB processing, so only deploy Interface Endpoints for services with high data volume (e.g. ECR image layers).
Case Study (TinyCTO In-Field Example)
TinyCTO discovered their ML training cluster was pulling 40 TB/day of image training data from S3 through 3 NAT Gateways, generating $54,000/month in NAT data processing charges. A platform engineer deployed a single Terraform line adding an S3 Gateway VPC Endpoint. NAT processing costs instantly plummeted to $120/month, saving $646,500 annually.
Interactive Concept Drills
3 CardsHow much does an AWS Gateway VPC Endpoint for S3 and DynamoDB cost?
What is the AWS NAT Gateway data processing fee?
How does an S3 Gateway Endpoint redirect traffic away from the NAT Gateway?
NAT Gateway & Private VPC Endpoint Cost Optimization — Technical FAQ
Which AWS services support free Gateway VPC Endpoints?
Only Amazon S3 and Amazon DynamoDB; all other AWS services use Interface VPC Endpoints (PrivateLink).
Should every Availability Zone have its own NAT Gateway in staging?
No; non-production environments should use a single shared NAT Gateway across all AZs to save ~$65/month per unused NAT Gateway in base hourly fees.
Can we use an open-source fck-nat instance instead of AWS NAT Gateway?
Yes, running a lightweight t4g.nano/micro EC2 instance with `fck-nat` eliminates the $0.045/GB processing tax entirely, ideal for cost-sensitive environments.
🤖 AEO & Key Facts Summary
Key Architectural Facts
- ▸Deploying a free S3 Gateway VPC Endpoint is a 1-minute configuration change that frequently slashes thousands of dollars from enterprise cloud invoices.
- ▸NAT Gateway data processing charges ($0.045/GB) are nearly 5x higher than intra-region data transfer fees.
Common Misconceptions
- ✗Believing that AWS NAT Gateway only costs its $32/month base hourly fee regardless of data transfer volume.
Decision & Governance Guidance
Check every VPC Route Table right now: ensure Gateway Endpoints are enabled for S3 and DynamoDB in all subnets.
Authoritative Sources & Standards
- [OFFICIAL-DOC]Gateway VPC Endpoints for Amazon S3 and DynamoDB— Amazon Web Services
- [OFFICIAL-DOC]Amazon VPC NAT Gateway Pricing & Data Processing Fees— Amazon Web Services
