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
In a nutshell
  • 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.

Traffic pathCharge typetransfer, processing, hourlyCheaper pathendpoint, same AZ, peering

How it works

The charge map

PathCharge idea
Internet into AWSGenerally not charged
AWS out to the internetCharged per GB
Between RegionsCharged per GB
Between AZs in a RegionCharged per GB in each direction
Same AZ over private IPsNo data transfer charge
Through a NAT gatewayHourly charge plus per GB processed
Through Transit GatewayPer attachment hour plus per GB processed
Through an interface endpointPer endpoint per AZ hour plus per GB processed
Through a gateway endpointNo 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.

Workload VPCgateway endpoint, freeS3Workload VPCNAT gateway, per GBInternet services

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

DesignSavesAdds
NAT gateways in every VPCNo Transit Gateway processing for internet trafficMany NAT hourly charges across accounts
Centralized egress VPC through Transit GatewayFewer NAT gateways to runTransit Gateway processing on every egress GB
Shared VPC subnets through AWS RAMFewer VPCs, NAT gateways and attachmentsShared 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.

RequirementCost aware choice
Hundreds of VPCs need any to any routingTransit Gateway
Two VPCs exchange large volumesVPC peering
One service shared with many accountsPrivateLink
Private access to S3 or DynamoDBGateway 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.
Watch out

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.