Cost-Optimized Networking: NAT Gateways, VPC Endpoints, and Data Transfer
Cost-optimized network architecture on AWS means routing, addressing and connecting your workloads so that every byte travels on the cheapest path that still meets the stated security, availability and performance requirements. AWS data transfer costs follow a small set of rules — inbound free, same-AZ private traffic free, cross-AZ and cross-Region charged, internet egress charged — and Task 4.4 is about arranging topology around those rules before traffic starts flowing. This lesson works through NAT gateway cost mechanics (single, per-AZ and regional NAT gateways, and NAT instances), the gateway and interface VPC endpoints that fix the most common NAT bill spike, CloudFront and Global Accelerator, VPN versus Direct Connect and how to size their bandwidth, peering versus Transit Gateway, throttling as a cost control, and the cost-visibility tools you use to review an existing workload. Domain 4 questions usually ask for the most cost-effective design, and network questions add a twist: the cheapest topology often trades away resilience, and the requirements decide which side wins. By the end you will be able to read a traffic path, say which segments are charged, and name the design change that removes the charge without breaking a stated requirement.
What you’ll learn
- Apply the data-transfer charging rules — inbound, same-AZ, cross-AZ, cross-Region, egress — as design inputs, and recognize when a paid transfer tool is not needed
- Choose between a single shared NAT gateway, per-AZ NAT gateways, a regional NAT gateway and a NAT instance by weighing cost against availability and operations
- Remove S3, DynamoDB and other AWS service traffic from NAT with gateway and interface VPC endpoints, and troubleshoot an endpoint that saves less than expected
- Decide when CloudFront and when Global Accelerator fits a content-delivery or latency problem
- Choose between VPN and Direct Connect, and allocate bandwidth with standard tunnels, ECMP, Large Bandwidth Tunnels or Direct Connect port speed
- Compare VPC peering and Transit Gateway costs and pick the right one for the VPC count
- Select a throttling strategy — API Gateway throttles and usage plans, WAF rate-based rules, CloudFront caching — that protects both the origin and the bill
- Find the network cost driver in an existing workload with Cost Explorer, the Cost and Usage Report, cost allocation tags and VPC Flow Logs
The 11 parts · about 23 min of reading
- The data-transfer cost modelStart hereInbound and same-AZ private traffic are free, while cross-AZ, cross-Region and internet egress are charged per gigabyte.2 min
- The transfer-cost rules tableCorrect answers move traffic onto free paths, and NAT and Transit Gateway charge twice: hourly for existing plus per GB processed.2 min
- NAT gateway economicsOne shared NAT gateway suits cost-first environments, per-AZ gateways suit production, and endpoints should come before any NAT resizing.3 min
- Gateway VPC endpointsFree gateway endpoints for S3 and DynamoDB remove NAT processing charges, but only for associated route tables and same-Region services.3 min
- CloudFront: cutting egress by serving from the edgeCloudFront cuts egress through caching and free origin fetches, while Global Accelerator adds a premium and caches nothing.2 min
- VPN vs Direct ConnectSite-to-Site VPN suits low volume or fast deployment; large, steady transfer volume justifies Direct Connect's fixed circuit costs.2 min
- VPC peering vs Transit Gateway (and where PrivateLink fits)Peer a handful of stable VPCs and pay only for transfer, use Transit Gateway at scale, and PrivateLink to expose one service to many.2 min
- Placement, chattiness, and the honest cost-vs-resilience tradeAccept cross-AZ charges for tiers that provide availability, and shrink the bytes that cross with compression and per-AZ caching.2 min
- Throttling strategyPer-client limits need API Gateway usage plans, while WAF rate rules and CloudFront caching stop requests most cheaply at the edge.1 min
- Reviewing an existing workloadCost Explorer finds the growing charge, tags show the owner, and VPC Flow Logs identify the traffic, so the biggest line gets fixed first.2 min
- Worked scenariosAnnotate each hop as charged or free, disqualify options that break security or availability, then pick the cheapest survivor.2 min
Mind map
How the exam tests this
SAA-C03 tests this task by describing a traffic path and asking for the most cost-effective change that still meets every stated requirement — the requirements sentence usually decides between the cheap option and the resilient one. The banner question is the NAT bill inflated by S3 or DynamoDB traffic from private subnets, answered by a free gateway VPC endpoint (and its follow-ups on route-table association, services whose own endpoint still relies on S3, and Region scope). Close behind are the single, per-AZ or regional NAT decision (the availability and operations constraints flip the answer), NAT instance setup, VPN versus Direct Connect selected on volume, latency and timeline, VPN bandwidth allocation (transit gateway, ECMP with BGP, Large Bandwidth Tunnels), peering versus Transit Gateway selected on VPC count, CloudFront versus Global Accelerator, throttling with usage plans or WAF rate-based rules, and finding a cost driver with Cost Explorer, cost allocation tags and Flow Logs. Trap patterns to expect: multiplying NAT gateways or switching to a regional NAT gateway to cut a per-GB charge, an interface endpoint for S3 where the free gateway endpoint exists, private DNS offered as a gateway-endpoint fix, Global Accelerator offered as a transfer cost saver, paid transfer tools for a migration with ample bandwidth and time, and single-AZ consolidation despite a high-availability requirement. Annotate each hop as charged or free, then pick the option that moves the biggest charged flow onto a free path without breaking a requirement.
Key takeaways
- Price the path before the fix: inbound is free, same-AZ private traffic is free, cross-AZ is charged both directions, cross-Region and internet egress are charged — the right answer moves traffic onto a free segment. Paid transfer tools (DataSync, Transfer Acceleration) only buy speed, never lower transfer cost.
- Gateway VPC endpoints for S3 and DynamoDB are free and remove NAT processing for that traffic — but only in the route tables they are associated with, and only for the VPC's own Region; interface endpoints for other services (ECR also needs the S3 gateway endpoint for layers) cost less than NAT only at volume.
- NAT gateways bill hourly plus per GB processed: a single shared NAT for cost-first environments, per-AZ NATs when availability is required. A regional NAT gateway is one ID that expands across AZs and is billed per active AZ plus per GB — simpler, not cheaper.
- A NAT instance is the cheap, self-managed option — built from a current AMI with IP forwarding on, the source/destination check off and the private route pointing at it; wrong whenever managed or highly available is stated.
- CloudFront cuts egress for cacheable content (edge caching, free origin fetch); Global Accelerator is a performance product with a per-GB premium, right for non-cacheable TCP/UDP traffic that needs static IPs or consistent latency.
- VPN is low fixed cost and quick to deploy; standard tunnels carry about 1.25 Gbps, Large Bandwidth Tunnels up to 5 Gbps, and ECMP across BGP VPNs scales further — both levers need a transit gateway. Direct Connect has fixed port costs, a lower per-GB rate at steady volume and weeks of lead time.
- VPC peering has no hourly or processing fees — cheapest for a few stable VPCs; Transit Gateway's per-attachment and per-GB fees buy transitive routing and manageability at scale; PrivateLink exposes one service to many VPCs.
- Throttle where it is cheapest: usage plans for per-client limits (best effort, not a hard cost cap), WAF rate-based rules per IP at the edge, CloudFront caching for repeats. Review existing workloads with Cost Explorer usage types, activated cost allocation tags and VPC Flow Logs before changing anything.
Part 1: The data-transfer cost model
Inbound and same-AZ private traffic are free, while cross-AZ, cross-Region and internet egress are charged per gigabyte.
Frequently asked questions
Why is my NAT gateway so expensive?
Because a NAT gateway charges two meters: an hourly fee for every hour it exists and a per-gigabyte processing fee on all traffic through it — and in most inflated NAT bills, the bulk of that traffic is instances in private subnets talking to S3 or DynamoDB. That traffic never needed the NAT gateway: a gateway VPC endpoint routes it directly to the service over the AWS network at no charge, cutting the processing fee for it to zero. Check VPC Flow Logs to confirm where the volume goes, add gateway endpoints first, consider interface endpoints for other high-volume AWS services, and only then revisit how many NAT gateways you run.
Are VPC gateway endpoints really free?
Yes. Gateway VPC endpoints — which exist for exactly two services, Amazon S3 and DynamoDB — carry no hourly charge and no per-gigabyte data processing charge. They are implemented as route-table entries, not billable network devices. That makes them strictly better than routing the same traffic through a NAT gateway, which charges per gigabyte processed: you save money, and the traffic stays on the AWS network rather than traversing the internet. Interface endpoints (used for most other AWS services via PrivateLink) are the ones that bill per hour per AZ plus per gigabyte — a distinction the exam checks directly.
Should I use one NAT gateway or one per Availability Zone?
It is a cost-versus-availability decision, and the scenario's requirements settle it. A single shared NAT gateway minimizes hourly fees but forces instances in other AZs to pay cross-AZ transfer to reach it — and if its AZ fails, every private subnet loses internet access. One NAT gateway per AZ multiplies the hourly fees but eliminates those cross-AZ charges and makes each AZ's egress independent. Choose the single NAT for dev, test, and cost-first environments with modest traffic; choose per-AZ NATs for production with a stated availability requirement or heavy egress from multiple AZs, where the removed cross-AZ charges claw back part of the extra cost. A regional NAT gateway gives the per-AZ behaviour behind one gateway ID with no public subnets, but it is billed hourly for each AZ it is active in, so it simplifies operations rather than cutting cost.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.