Cost-Optimized Architecture Design · Topic 5 of 8
Data Transfer and Network Costs
Reduce AWS data transfer and network spend with VPC endpoints, AZ aware design, NAT gateway placement, Transit Gateway processing and PrivateLink pricing.
- 5 min
- Gateway endpoints for S3 and DynamoDB have no hourly or processing charge.
- NAT gateways and Transit Gateway both charge per GB processed, on top of hourly charges.
- Cross AZ traffic is charged in each direction, while same AZ traffic over private IPs is not.
What it is
In a large estate, network cost is spread across many small charges: NAT gateway processing, cross AZ transfer, Transit Gateway processing, endpoint hours and inter Region transfer. Together they can rival compute spend.
The professional exam tests whether you can find the expensive path in a multi account design and replace it with a cheaper one without breaking security or availability.
How it works
The charge map
| Path | Charge idea |
|---|---|
| Internet into AWS | Generally not charged |
| AWS out to the internet | Charged per GB |
| Between Regions | Charged per GB |
| Between AZs in a Region | Charged per GB in each direction |
| Same AZ over private IPs | No data transfer charge |
| Through a NAT gateway | Hourly charge plus per GB processed |
| Through Transit Gateway | Per attachment hour plus per GB processed |
| Through an interface endpoint | Per endpoint per AZ hour plus per GB processed |
| Through a gateway endpoint | No hourly or processing charge |
Exact rates vary by Region, so the exam asks about the pattern, not the number.
Private connectivity to AWS services
Gateway VPC endpoints exist for Amazon S3 and DynamoDB. They add a route table entry, have no hourly or processing charge, and remove NAT gateway processing for that traffic. This is the first fix when private subnets move large volumes to S3.
Interface endpoints (AWS PrivateLink) serve most other services. They charge per hour for each AZ they are deployed in and per GB processed. In a multi account estate, centralizing interface endpoints in a shared services VPC and resolving them through Route 53 can cut endpoint hours, but the traffic then crosses Transit Gateway, which adds processing charges.
AZ aware design
Cross AZ traffic is charged in both directions. Keep chatty tiers in the same AZ where availability allows, for example by routing each AZ to its own NAT gateway and preferring same AZ targets.
Place a NAT gateway in every AZ that has private workloads. One shared NAT gateway saves the hourly charge but adds cross AZ transfer and creates a single AZ dependency. For production, one per AZ is the standard answer, while a development VPC may accept one.
Cross zone load balancing on Network Load Balancers is off by default, and turning it on can add inter AZ data charges.
Centralized egress versus per VPC NAT
| Design | Saves | Adds |
|---|---|---|
| NAT gateways in every VPC | No Transit Gateway processing for internet traffic | Many NAT hourly charges across accounts |
| Centralized egress VPC through Transit Gateway | Fewer NAT gateways to run | Transit Gateway processing on every egress GB |
| Shared VPC subnets through AWS RAM | Fewer VPCs, NAT gateways and attachments | Shared network ownership and less account isolation |
Centralized egress pays off with many low traffic VPCs. When a few VPCs push heavy internet traffic, local NAT gateways can cost less, because they avoid the Transit Gateway processing charge.
Transit Gateway versus peering versus PrivateLink
Transit Gateway charges for each attachment hour and for data processed. It scales to hundreds of VPCs with central routing and inspection.
VPC peering has no hourly charge and no processing charge. Traffic within the same AZ over a peering connection is not charged, while cross AZ and cross Region traffic is charged at normal transfer rates. For a few high volume VPC pairs, peering is often cheaper than Transit Gateway.
PrivateLink exposes one service, behind a Network Load Balancer, to many consumer VPCs. Consumers pay endpoint hours and processing, and the provider runs the load balancer. It suits a service consumed by many accounts, works with overlapping CIDR ranges and avoids routing whole networks together.
| Requirement | Cost aware choice |
|---|---|
| Hundreds of VPCs need any to any routing | Transit Gateway |
| Two VPCs exchange large volumes | VPC peering |
| One service shared with many accounts | PrivateLink |
| Private access to S3 or DynamoDB | Gateway endpoint |
Regional and inter Region patterns
Keep compute next to its data. Reading S3 data from another Region pays inter Region transfer on every read, so copy it once if many jobs read it.
For hybrid traffic, AWS Direct Connect has lower data transfer out rates than the internet, which suits large, steady flows. A Site-to-Site VPN is cheaper to start for small or temporary needs.
How the exam asks about this
- "Private subnets in 40 accounts send terabytes to S3 through NAT gateways, and the bill is high." -> Add S3 gateway endpoints in each VPC.
- "Two VPCs in the same Region exchange very large volumes, and Transit Gateway processing dominates the bill." -> Add a VPC peering connection between those two VPCs.
- "A SaaS provider must offer one API privately to hundreds of customer VPCs with overlapping CIDRs." -> AWS PrivateLink with a Network Load Balancer.
What to remember for the exam
- Gateway endpoints for S3 and DynamoDB have no hourly or processing charge.
- NAT gateways and Transit Gateway both charge per GB processed, on top of hourly charges.
- Cross AZ traffic is charged in each direction, while same AZ traffic over private IPs is not.
- Peering has no hourly or processing charge, which suits a few high volume VPC pairs.
- PrivateLink fits one service shared to many VPCs, even with overlapping CIDRs.
- Centralized egress saves NAT gateways but adds Transit Gateway processing.
Do not collapse production to a single NAT gateway to save money. It adds cross AZ charges and an AZ wide outage risk, which breaks the availability requirement.
Common mistakes
Sending S3 traffic through Transit Gateway to a central NAT. That pays Transit Gateway processing and NAT processing on every GB. A local gateway endpoint removes both.
Using Transit Gateway for every connection. It is the right hub for many VPCs, but a high volume pair is cheaper over peering. Mixed designs are normal.
Ignoring interface endpoint hours. Each endpoint bills per AZ per hour, in every VPC. With dozens of services and accounts, centralize the endpoints or drop the ones nobody uses.
Check yourself
Which VPC endpoint type has no hourly or data processing charge?
Gateway endpoints, which are available for Amazon S3 and DynamoDB.
Why can VPC peering be cheaper than Transit Gateway for two busy VPCs?
Peering has no attachment or processing charge, so you pay only normal data transfer, and same AZ traffic over it is not charged.
What extra cost does centralized egress through Transit Gateway add?
Transit Gateway data processing on every GB of internet bound traffic, in addition to the NAT gateway charges.
Topic 5 of 8 in Cost-Optimized Architecture Design
Test yourself on Cost-Optimized Architecture Design
The full AWS SAP-C03 question bank has 850 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.