Lesson 2 of 2 AWS Cost Management

Designing Cheaper Network Paths with Data Transfer Pricing

This lesson explains the data transfer charges that are a frequent hidden cost, and how knowing the rules helps you design cheaper network paths.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify which transfers are free and which are charged.
  • Explain how cheaper network paths reduce transfer charges.

What is free and what is charged

Data transfer costs depend on where data goes, and architecture questions often turn on them. Data coming in from the internet is free, while data going out to the internet is the most expensive transfer, priced in tiers. Traffic within one Availability Zone over private IP addresses is free, but traffic between Availability Zones is charged in each direction, and traffic between Regions, including replication, is charged too.

Some paths avoid charges. Transfer from AWS origins to CloudFront is free, so serving content through CloudFront can cost less than serving it directly. S3 and DynamoDB traffic through gateway endpoints is free, whereas the same traffic through a NAT gateway is charged for processing. Traffic sent to public or Elastic IP addresses is charged even within a Region, and NAT gateways, interface endpoints and Transit Gateway each charge per gigabyte processed. The following table summarises the rules.

FreeCharged
Data in from the internetData out to the internet (highest, tiered)
Same-AZ traffic over private IPsInter-AZ traffic, in each direction
AWS origins to CloudFrontInter-Region traffic, including replication
S3 and DynamoDB via gateway endpointsTraffic via public or Elastic IPs, even within a Region
—NAT gateway, interface endpoint and Transit Gateway processing per GB

The following diagram marks free paths in teal and charged paths in red.

Which data transfers are charged. Data in from the internet is free, data out to the internet is the most expensive, and traffic between Availability Zones or Regions is charged. Traffic within one zone over private addresses, from AWS origins to CloudFront, and to S3 or DynamoDB through a gateway endpoint is free, while the same S3 traffic through a NAT gateway is charged for processing.
Rates vary by Region and change over time; the pattern of free and charged paths is what questions test.

Saving on transfer

Data transfer charges can be reduced by choosing the network path. Amazon CloudFront delivers content to the internet at lower rates than direct transfer out of a Region, and caching reduces origin traffic further. Gateway endpoints for S3 and DynamoDB avoid NAT gateway processing charges. Components that exchange large volumes of data can be placed in the same Availability Zone where availability requirements allow, and AWS Direct Connect lowers the cost of large, steady outbound volumes.

Compressing data reduces every transfer, and cross-Region replication should be limited to the data that actually needs to be in another Region. Multi-AZ designs add cross-AZ charges, for standby replication and chatty services, but the availability they provide is usually worth the cost.

Scenario questions

Cutting transfer costs

Exam skills 4.4.3 · 4.4.4

Choose the design that reduces data transfer cost.

Log in to try this activity Interactive activities are free with an account.
Worked example

Private-subnet instances download 10 TB a month from S3 through a NAT gateway, paying NAT processing on every GB. A free S3 gateway endpoint removes that charge and keeps traffic private.

Check yourself

Which data transfers are normally free?

Show answer

Data into AWS from the internet, and data between services in the same Availability Zone over private IP addresses. Data out to the internet and between Regions is charged.

Exam Tips

Remember for the exam

  • Inbound data transfer is free, and outbound transfer to the internet is the most expensive.
  • Cross-AZ traffic is charged in both directions, while private traffic within one zone is free.
  • For high NAT charges on S3 traffic, use a gateway endpoint.
  • For traffic from private subnets to S3 or DynamoDB, use a gateway endpoint instead of NAT.
  • For serving content to internet users, CloudFront usually cuts the cost of data transfer out.