AWS Architecture Blog

Exploring Data Transfer Costs for AWS Managed Databases

When selecting managed database services in AWS, it’s important to understand how data transfer charges are calculated – whether it’s relational, key-value, document, in-memory, graph, time series, wide column, or ledger.

This blog will outline the data transfer charges for several AWS managed database offerings to help you choose the most cost-effective setup for your workload.

This blog illustrates pricing at the time of publication and assumes no volume discounts or applicable taxes and duties. For demonstration purposes, we list the primary AWS Region as US East (Northern Virginia) and the secondary Region is US West (Oregon). Always refer to the individual service pricing pages for the most up-to-date pricing.

Data transfer between AWS and internet

There is no charge for inbound data transfer across all services in all Regions. When you transfer data from AWS resources to the internet, you’re charged per service, with rates specific to the originating Region. Figure 1 illustrates data transfer charges that accrue from AWS services discussed in this blog out to the public internet in the US East (Northern Virginia) Region.

Data transfer to the internet

Figure 1. Data transfer to the internet

The remainder of this blog will focus on data transfer within AWS.

Data transfer with HAQM RDS

HAQM Relational Database Service (HAQM RDS) makes it straightforward to set up, operate, and scale a relational database in the cloud. HAQM RDS provides six database engines to choose from: HAQM Aurora, MySQL, MariaDB, Oracle, SQL Server, and PostgreSQL.

Let’s consider an application running on HAQM Elastic Compute Cloud (HAQM EC2) that uses HAQM RDS as a data store.

Figure 2 illustrates where data transfer charges apply. For clarity, we have left out connection points to the replica servers – this is addressed in Figure 3.

HAQM RDS data transfer

Figure 2. HAQM RDS data transfer

In this setup, you will not incur charges for:

  • Data transfer to or from HAQM EC2 in the same Region, Availability Zone, and virtual private cloud (VPC)

You will accrue charges for data transfer between:

  • HAQM EC2 and HAQM RDS across Availability Zones within the same VPC, charged at HAQM EC2 and HAQM RDS ($0.01/GB in and $0.01/GB out)
  • HAQM EC2 and HAQM RDS across Availability Zones and across VPCs, charged at HAQM EC2 only ($0.01/GB in and $0.01/GB out). For Aurora, this is charged at HAQM EC2 and Aurora ($0.01/GB in and $0.01/GB out)
  • HAQM EC2 and HAQM RDS across Regions, charged on both sides of the transfer ($0.02/GB out)

Figure 3 illustrates several features that are available within HAQM RDS to show where data transfer charges apply. These include multi-Availability Zone deployment, read replicas, and cross-Region automated backups. Not all database engines support all features, consult the product documentation to learn more.

HAQM RDS features

Figure 3. HAQM RDS features

In this setup, you will not incur data transfer charges for:

In addition to the charges you will incur when you transfer data to the internet, you will accrue data transfer charges for:

  • Data replication to read replicas deployed across Regions ($0.02/GB out)
  • Regional transfers for HAQM RDS snapshot copies or automated cross-Region backups ($0.02/GB out)

Refer to the following pricing pages for more detail:

Data transfer with HAQM DynamoDB

HAQM DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale. Figures 4 and 5 illustrate an application hosted on HAQM EC2 that uses DynamoDB as a data store and includes DynamoDB global tables and DynamoDB Accelerator (DAX).

DynamoDB with global tables

Figure 4. DynamoDB with global tables

DynamoDB without global tables

Figure 5. DynamoDB without global tables

You will not incur data transfer charges for:

  • Inbound data transfer to DynamoDB
  • Data transfer between DynamoDB and HAQM EC2 in the same Region
  • Data transfer between HAQM EC2 and DAX in the same Availability Zone

In addition to the charges you will incur when you transfer data to the internet, you will accrue charges for data transfer between:

  • HAQM EC2 and DAX across Availability Zones, charged at the EC2 instance ($0.01/GB in and $0.01/GB out)
  • Global tables for cross-Region replication or adding replicas to tables that contain data in DynamoDB, charged at the source Region, as shown in Figure 4 ($0.02/GB out)
  • HAQM EC2 and DynamoDB across Regions, charged on both sides of the transfer, as shown in Figure 5 ($0.02/GB out)

Refer to the DynamoDB pricing page for more detail.

Data transfer with HAQM Redshift

HAQM Redshift is a cloud data warehouse that makes it fast and cost-effective to analyze your data using standard SQL and your existing business intelligence tools. There are many integrations and services available to query and visualize data within HAQM Redshift. To illustrate data transfer costs, Figure 6 shows an EC2 instance running a consumer application connecting to HAQM Redshift over JDBC/ODBC.

HAQM Redshift data transfer

Figure 6. HAQM Redshift data transfer

You will not incur data transfer charges for:

  • Data transfer within the same Availability Zone
  • Data transfer to HAQM S3 for backup, restore, load, and unload operations in the same Region

In addition to the charges you will incur when you transfer data to the internet, you will accrue charges for the following:

  • Across Availability Zones, charged on both sides of the transfer ($0.01/GB in and $0.01/GB out)
  • Across Regions, charged on both sides of the transfer ($0.02/GB out)

Refer to the HAQM Redshift pricing page for more detail.

Data transfer with HAQM DocumentDB

HAQM DocumentDB (with MongoDB compatibility) is a database service that is purpose-built for JSON data management at scale. Figure 7 illustrates an application hosted on HAQM EC2 that uses HAQM DocumentDB as a data store, with read replicas in multiple Availability Zones and cross-Region replication for HAQM DocumentDB Global Clusters.

HAQM DocumentDB data transfer

Figure 7. HAQM DocumentDB data transfer

You will not incur data transfer charges for:

  • Data transfer between HAQM DocumentDB and EC2 instances in the same Availability Zone
  • Data transferred for replicating multi-Availability Zone deployments of HAQM DocumentDB between Availability Zones in the same Region

In addition to the charges you will incur when you transfer data to the internet, you will accrue charges for the following:

  • Between HAQM EC2 and HAQM DocumentDB in different Availability Zones within a Region, charged at HAQM EC2 and HAQM DocumentDB ($0.01/GB in and $0.01/GB out)
  • Across Regions between HAQM DocumentDB instances, charged at the source Region ($0.02/GB out)

Refer to the HAQM DocumentDB pricing page for more details.

Tips to save on data transfer costs to your databases

  • Review potential data transfer charges on both sides of your communication channel. Remember that “Data Transfer In” to a destination is also “Data Transfer Out” from a source.
  • Use Regional and global readers or replicas where available. This can reduce the amount of cross-Availability Zone or cross-Region traffic.
  • Consider data transfer tiered pricing when estimating workload pricing. Rate tiers aggregate usage for data transferred out to the Internet across HAQM EC2, HAQM RDS, HAQM Redshift, DynamoDB, HAQM S3, and several other services. See the HAQM EC2 On-Demand pricing page for more details.
  • Understand backup or snapshots requirements and how data transfer charges apply.
  • AWS offers various purpose-built, managed database offerings. Selecting the right one for your workload can optimize performance and cost.
  • Review your application and query design. Look for ways to reduce the amount of data transferred between your application and data store. Consider designing your application or queries to use read replicas.

Conclusion/next steps

AWS offers purpose-built databases to support your applications and data models, including relational, key-value, document, in-memory, graph, time series, wide column, and ledger databases. Each database has different deployment options, and understanding different data transfer charges can help you design a cost-efficient architecture.

This blog post is intended to help you make informed decisions for designing your workload using managed databases in AWS. Note that service charges and charges related to network topology, such as AWS Transit Gateway, VPC Peering, and AWS Direct Connect, are out of scope for this blog but should be carefully considered when designing any architecture.

Looking for more cost saving tips and information? Check out the Overview of Data Transfer Costs for Common Architectures blog post.

Dennis Schmidt

Dennis Schmidt

Dennis Schmidt is a Solutions Architect based in Rochester, New York. He works with Greenfield customers, helping them get started on their cloud journey with AWS, and is passionate about containers, serverless, and cost optimization. Outside of work, Dennis enjoys spending time with family and attending various sporting events.

Sebastian Gorczynski

Sebastian Gorczynski

Sebastian Gorczynski is a Solutions Architect who works with enterprise companies. He is passionate about helping customers to innovate and design scalable, well-architected solutions on the AWS Cloud. Sebastian is based out of New York City and outside of work loves spending time with his family and friends.

Birender Pal

Birender Pal

Birender is a Solutions Architect at AWS, based in Pennsylvania. He works with customers in the Northeast U.S. to craft highly scalable, flexible, and resilient cloud architectures that address customer business problems. In his spare time, he tries his hand at new recipes from across the world in the kitchen.