Reducing Network Costs
This lesson explains the few standard changes that produce most network cost savings: keeping traffic off NAT gateways, keeping it within an Availability Zone, serving it from the edge and removing unused public addresses.
Learning outcomes
After completing this lesson, you will be able to:
- Use gateway and interface endpoints to reduce NAT charges.
- Keep traffic within an Availability Zone.
- Reduce edge, public IPv4 and connection costs.
NAT and endpoints
Traffic from private subnets to S3 and DynamoDB in the same Region should use gateway endpoints, which are free and remove NAT processing charges. For other AWS services, interface endpoints cost per hour per AZ plus a lower per-GB rate than NAT, so they save money when traffic volume to that service is high, and they are required anyway for isolated subnets. Each AZ's private subnets should route to a NAT gateway in the same AZ (or use a regional NAT gateway) to avoid paying cross-AZ charges on top of NAT processing. Development environments can share NAT through a central egress VPC via Transit Gateway, though Transit Gateway processing charges must be weighed against NAT hourly savings.
The following diagram compares a higher-cost and a lower-cost design for the same traffic.

Cutting NAT costs
Keeping traffic local
Cross-AZ data transfer is charged in both directions, so chatty components should be AZ-aware: clients reading from replicas in their own AZ, cross-zone load balancing considered carefully for NLBs (where cross-AZ traffic is charged, unlike ALBs), Kafka-style or cache clients preferring local nodes, and ECS or EKS services using topology-aware routing. High availability still requires multiple AZs, so the aim is to keep the steady-state path local while retaining failover. Placing tightly coupled batch workloads in one AZ is acceptable when they can tolerate an AZ outage.
Edge delivery, IPv4 and connection choices
CloudFront reduces internet egress costs because data transfer from CloudFront is priced lower than from EC2 or S3 directly, origin fetches from AWS origins to CloudFront are free, and caching reduces origin load; flat-rate CloudFront pricing plans bundle transfer and security features. Public IPv4 addresses are charged hourly, so release unused Elastic IPs, avoid auto-assigning public IPs to instances that sit behind load balancers, use NAT or endpoints for outbound access, and adopt IPv6 (no charge) with egress-only gateways where possible. For connecting VPCs, VPC peering has no hourly or processing charge, so a few high-volume VPC-to-VPC flows can be cheaper over peering than through Transit Gateway. The following table summarises the main optimisations.
| Cost driver | Optimisation |
|---|---|
| NAT processing for S3 or DynamoDB traffic | Gateway endpoints |
| NAT processing for high-volume AWS API traffic | Interface endpoints |
| Private subnets using another AZ's NAT gateway | NAT gateway per AZ or regional NAT gateway |
| Cross-AZ chatter | AZ-aware clients and routing |
| Internet egress for downloads and media | CloudFront caching and pricing |
| Idle or unnecessary public IPv4 addresses | Release Elastic IPs; disable auto-assign; use IPv6 |
| High-volume traffic between two VPCs over Transit Gateway | VPC peering for that pair |
Cutting public IPv4 cost
Cutting the NAT bill
Following the analysis in the previous topic, the team adds an S3 gateway endpoint to the private route tables, removing 36 TB a month of NAT processing, creates a NAT gateway in the second AZ so each AZ routes locally, and configures the application's cache client to read from the replica in its own AZ. They also find 18 idle Elastic IP addresses from decommissioned servers and release them. Network costs fall by about 70% with no change to availability.
How can internet egress cost for static content be reduced?
Show answer
Serve it through CloudFront, which also reduces origin load.
Exam Tips
Remember for the exam
- Gateway endpoints remove NAT charges for S3 and DynamoDB traffic.
- Route each AZ to a local NAT gateway to avoid cross-AZ charges.
- CloudFront lowers internet egress cost and origin load.
- Release idle Elastic IPs and avoid unnecessary public IPv4 addresses.
- VPC peering avoids Transit Gateway processing charges for heavy VPC pairs.