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.
The remainder of this blog will focus on data transfer within AWS.
Data transfer with Amazon RDS
Amazon Relational Database Service (Amazon RDS) makes it straightforward to set up, operate, and scale a relational database in the cloud. Amazon RDS provides six database engines to choose from: Amazon Aurora, MySQL, MariaDB, Oracle, SQL Server, and PostgreSQL.
Let’s consider an application running on Amazon Elastic Compute Cloud (Amazon EC2) that uses Amazon 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.
In this setup, you will not incur charges for:
- Data transfer to or from Amazon EC2 in the same Region, Availability Zone, and virtual private cloud (VPC)
You will accrue charges for data transfer between:
- Amazon EC2 and Amazon RDS across Availability Zones within the same VPC, charged at Amazon EC2 and Amazon RDS ($0.01/GB in and $0.01/GB out)
- Amazon EC2 and Amazon RDS across Availability Zones and across VPCs, charged at Amazon EC2 only ($0.01/GB in and $0.01/GB out). For Aurora, this is charged at Amazon EC2 and Aurora ($0.01/GB in and $0.01/GB out)
- Amazon EC2 and Amazon RDS across Regions, charged on both sides of the transfer ($0.02/GB out)
Figure 3 illustrates several features that are available within Amazon 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.
In this setup, you will not incur data transfer charges for:
- Data replication in a multi-Availability Zone deployment or to read replicas within the same Region
- Transfer of snapshots to Amazon Simple Storage Service (Amazon S3) in the same Region
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 Amazon RDS snapshot copies or automated cross-Region backups ($0.02/GB out)
Refer to the following pricing pages for more detail:
- Amazon Aurora
- Amazon RDS for MySQL
- Amazon RDS for MariaDB
- Amazon RDS for Oracle
- Amazon RDS for SQL Server
- Amazon RDS for PostgreSQL
Data transfer with Amazon DynamoDB
Amazon 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 Amazon EC2 that uses DynamoDB as a data store and includes DynamoDB global tables and DynamoDB Accelerator (DAX).
You will not incur data transfer charges for:
- Inbound data transfer to DynamoDB
- Data transfer between DynamoDB and Amazon EC2 in the same Region
- Data transfer between Amazon 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:
- Amazon 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)
- Amazon 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 Amazon Redshift
Amazon 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 Amazon Redshift. To illustrate data transfer costs, Figure 6 shows an EC2 instance running a consumer application connecting to Amazon Redshift over JDBC/ODBC.
You will not incur data transfer charges for:
- Data transfer within the same Availability Zone
- Data transfer to Amazon 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 Amazon Redshift pricing page for more detail.
Data transfer with Amazon DocumentDB
Amazon 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 Amazon EC2 that uses Amazon DocumentDB as a data store, with read replicas in multiple Availability Zones and cross-Region replication for Amazon DocumentDB Global Clusters.
You will not incur data transfer charges for:
- Data transfer between Amazon DocumentDB and EC2 instances in the same Availability Zone
- Data transferred for replicating multi-Availability Zone deployments of Amazon 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 Amazon EC2 and Amazon DocumentDB in different Availability Zones within a Region, charged at Amazon EC2 and Amazon DocumentDB ($0.01/GB in and $0.01/GB out)
- Across Regions between Amazon DocumentDB instances, charged at the source Region ($0.02/GB out)
Refer to the Amazon 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 Amazon EC2, Amazon RDS, Amazon Redshift, DynamoDB, Amazon S3, and several other services. See the Amazon 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.