Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

6.1.6. Network Cost Optimization

šŸ’” First Principle: Data transfer in AWS is asymmetric — most transfers into AWS are free; transfers out to the internet and between regions cost money. Understanding the cost model is an operational skill: architectural decisions about where to place resources affect both performance and the monthly bill.

Data Transfer Cost Model:
Transfer TypeCost
Inbound from internet to AWSāœ… Free
Outbound to internet~$0.09/GB (varies by region)
Between AZs in same region~$0.01/GB each way
Between regions~$0.02–$0.09/GB (varies)
Through VPC endpoint (gateway)āœ… Free
Through VPC endpoint (interface)~$0.01/GB processed
NAT Gateway data processing~$0.045/GB
Cost Optimization Strategies:
StrategySavings
Use S3/DynamoDB gateway endpointsEliminates NAT gateway data processing fees for S3/DynamoDB traffic
Keep traffic in-AZPlace EC2 and RDS in same AZ for inter-component traffic (at cost of HA)
Use CloudFrontCache content at edge — reduce origin data transfer costs
Compress data before transferReduces bytes transferred
Use VPC endpoints for AWS servicesAvoid NAT gateway processing fees

A common exam scenario: an EC2 instance in a private subnet transfers 10TB to S3 every day through a NAT gateway. The NAT gateway data processing fee (10TB Ɨ $0.045/GB = $461/day) is eliminated by adding an S3 gateway endpoint — routing S3 traffic directly without the NAT gateway.

āš ļø Exam Trap: Inter-AZ data transfer is not free — it's approximately $0.01/GB each direction. Architectures that communicate heavily between AZs (e.g., a web tier in AZ-a calling a database in AZ-b on every request) incur real costs. The exam may present this as a cost optimization opportunity: move the RDS read replica to the same AZ as the application tier, accepting reduced HA in exchange for cost savings (or use a Multi-AZ setup and direct reads to the local replica).

Reflection Question: A company's monthly AWS bill shows unexpectedly high data transfer costs. Investigation reveals that 50TB/month of traffic flows from EC2 instances in private subnets to S3, all routed through NAT gateways. What is the cheapest architectural change, and roughly how much does it save assuming $0.045/GB NAT processing + $0.09/GB NAT outbound vs. free gateway endpoint traffic?

Alvin Varughese
Written byAlvin Varughese
Founder•15 professional certifications