Exploring Data Transfer Costs for AWS Managed Databases
AWS Architecture BlogExploring Data Transfer Costs for AWS Managed Databasesby Dennis Schmidt, Sebastian Gorczynski, and Birender Pal | on02 NOV 2021| inAmazon Aurora,Amazon DocumentDB,Amazon DynamoDB,Amazon RDS,Amazon Redshift,Architecture,RDS for PostgreSQL|Permalink|ShareWhen 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 internetThere 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.Figure 1. Data transfer to the internetThe remainder of this blog will focus on data transfer within AWS.Data transfer with Amazon RDSAmazon 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, andPostgreSQL.Let’s consider an application running onAmazon 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.Figure 2. Amazon RDS data transferIn 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 includemulti-Availability Zone deployment,read replicas, andcross-Region automated backups. Not all database engines support all features, consult the product documentation to learn more.Figure 3. Amazon RDS featuresIn 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 RegionTransfer of snapshots toAmazon Simple Storage Service (Amazon S3)in the same RegionIn 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 AuroraAmazon RDS for MySQLAmazon RDS for MariaDBAmazon RDS for OracleAmazon RDS for SQL ServerAmazon RDS for PostgreSQLData transfer with Amazon DynamoDBAmazon DynamoDBis 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 includesDynamoDB global tablesandDynamoDB Accelerator (DAX).Figure 4. DynamoDB with global tablesFigure 5. DynamoDB without global tablesYou will not incur data transfer charges for:Inbound data transfer to DynamoDBData transfer between DynamoDB and Amazon EC2 in the same RegionData transfer between Amazon EC2 and DAX in the same Availability ZoneIn 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 theDynamoDB pricing pagefor more detail.Data transfer with Amazon RedshiftAmazon Redshiftis 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.Figure 6. Amazon Redshift data transferYou will not incur data transfer charges for:Data transfer within the same Availability ZoneData transfer to Amazon S3 for backup, restore, load, and unload operations in the same RegionIn 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 theAmazon Redshift pricing pagefor more detail.Data transfer with Amazon DocumentDBAmazon 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 forAmazon DocumentDB Global Clusters.Figure 7. Amazon DocumentDB data transferYou will not incur data transfer charges for:Data transfer between Amazon DocumentDB and EC2 instances in the same Availability ZoneData transferred for replicating multi-Availability Zone deployments of Amazon DocumentDB between Availability Zones in the same RegionIn 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 theAmazon DocumentDB pricing pagefor more details.Tips to save on data transfer costs to your databasesReview 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 theAmazon EC2 On-Demand pricing pagefor 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 stepsAWS 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 asAWS Transit Gateway,VPC Peering, andAWS 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 theOverview of Data Transfer Costs for Common Architecturesblog post.Dennis SchmidtDennis 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 GorczynskiSebastian 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 PalBirender 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.
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 […]
Dennis Schmidt
Amazon Aurora Amazon DocumentDB Amazon DynamoDB Amazon RDS Amazon Redshift Architecture RDS for PostgreSQL