Overview of Data Transfer Costs for Common Architectures
AWS Architecture BlogOverview of Data Transfer Costs for Common Architecturesby Birender Pal, Sebastian Gorczynski, and Dennis Schmidt | on30 JUN 2021| inAmazon EC2,Amazon RDS,Architecture,AWS Direct Connect,AWS Site-to-Site VPN,AWS Transit Gateway|Permalink|ShareData transfer charges are often overlooked while architecting a solution in AWS. Considering data transfer charges while making architectural decisions can help save costs. This blog post will help identify potential data transfer charges you may encounter while operating your workload on AWS. Service charges are out of scope for this blog, but should be carefully considered when designing any architecture.Data transfer between AWS and internetThere is no charge for inbound data transfer across all services in all Regions. Data transfer from AWS to the internet is charged per service, with rates specific to the originating Region. Refer to the pricing pages for each service—for example, thepricing pageforAmazon Elastic Compute Cloud (Amazon EC2)—for more details.Data transfer within AWSData transfer within AWS could be from your workload to other AWS services, or it could be between different components of your workload.Data transfer between your workload and other AWS servicesWhen your workload accesses AWS services, you may incur data transfer charges.Accessing services within the same AWS RegionIf theinternet gatewayis used to access the public endpoint of the AWS services in the same Region (Figure 1 – Pattern 1), there are no data transfer charges. If aNAT gatewayis used to access the same services (Figure 1 – Pattern 2), there is a data processing charge (per gigabyte (GB)) for data that passes through the gateway.Figure 1. Accessing AWS services in same RegionAccessing services across AWS RegionsIf your workload accesses services in different Regions (Figure 2), there is a charge for data transfer across Regions. The charge depends on the source and destination Region (as described on theAmazon EC2 Data Transfer pricing page).Figure 2. Accessing AWS services in different RegionData transfer within different components of your workloadCharges may apply if there is data transfer between different components of your workload. These charges vary depending on where the components are deployed.Workload components in same AWS RegionData transfer within the same Availability Zone isfree. One way to achieve high availability for a workload is to deploy in multiple Availability Zones.Consider a workload with two application servers running on Amazon EC2 and a database running onAmazon Relational Database Service (Amazon RDS)for MySQL (Figure 3). For high availability, each application server is deployed into a separate Availability Zone. Here,data transfer charges applyfor cross-Availability Zone communication between the EC2 instances. Data transfer charges also apply between Amazon EC2 and Amazon RDS. Consult theAmazon RDS for MySQL pricing guidefor more information.Figure 3. Workload components across Availability ZonesTo minimize impact of a database instance failure, enable amulti-Availability Zone configurationwithin Amazon RDS to deploy a standby instance in a different Availability Zone. Replication between the primary and standby instances does not incur additional data transfer charges. However, data transfer charges will apply from any consumers outside the current primary instance Availability Zone. Refer to theAmazon RDS pricing pagefor more detail.A common pattern is to deploy workloads across multiple VPCs in your AWS network. Two approaches to enabling VPC-to-VPC communication are VPC peering connections and AWS Transit Gateway. Data transfer over a VPC peering connection that stays within an Availability Zone is free. Data transfer over a VPC peering connection that crosses Availability Zones will incur a data transfer charge for ingress/egress traffic (Figure 4).Figure 4. VPC peering connectionTransit Gateway can interconnect hundreds or thousands of VPCs (Figure 5).Cost elements for Transit Gatewayinclude an hourly charge for each attached VPC,AWS Direct Connect, orAWS Site-to-Site VPN. Data processing charges apply for each GB sent from a VPC, Direct Connect, or VPN to Transit Gateway.Figure 5. VPC peering using Transit Gateway in same RegionWorkload components in different AWS RegionsIf workload components communicate across multiple Regions using VPC peering connections or Transit Gateway, additional data transfer charges apply. If the VPCs are peered across Regions, standard inter-Region data transfer charges will apply (Figure 6).Figure 6. VPC peering across RegionsFor peered Transit Gateways, you will incur data transfer charges on only one side of the peer. Data transfer charges do not apply for data sent from a peering attachment to a Transit Gateway. The data transfer for this cross-Region peering connection is in addition to the data transfer charges for the other attachments (Figure 7).Figure 7. Transit Gateway peering across RegionsData transfer between AWS and on-premises data centersData transfer will occur when your workload needs to access resources in your on-premises data center. There are two common options to help achieve this connectivity: Site-to-Site VPN and Direct Connect.Data transfer over AWS Site-to-Site VPNOne option to connect workloads to an on-premises network is to use one or more Site-to-Site VPN connections (Figure 8 – Pattern 1). These charges include an hourly charge for the connection and a charge for data transferred from AWS. Refer toSite-to-Site VPN pricingfor more details. Another option to connect multiple VPCs to an on-premises network is to use a Site-to-Site VPN connection to a Transit Gateway (Figure 8 – Pattern 2). The Site-to-Site VPN will be considered another attachment on the Transit Gateway.Standard Transit Gateway pricingapplies.Figure 8. Site-to-Site VPN patternsData transfer over AWS Direct ConnectDirect Connect can be used to connect workloads in AWS to on-premises networks. Direct Connect incurs a fee for each hour the connection port is used and data transfer charges for data flowing out of AWS. Data transfer into AWS is $0.00 per GB in all locations. The data transfer charges depend on the source Region and the Direct Connect provider location. Direct Connect can also connect to the Transit Gateway (via Direct Connect Gateway) if multiple VPCs need to be connected (Figure 9). Direct Connect is considered another attachment on the Transit Gateway and standardTransit Gateway pricingapplies. Refer to theDirect Connect pricing pagefor more details.Figure 9. Direct Connect patterns.jpgA Direct Connect gateway can be used to share a Direct Connect across multiple Regions. When using a Direct Connect gateway, there will be outbound data charges based on the source Region and Direct Connect location (Figure 10).Figure 10. Direct Connect gatewayGeneral tipsData transfer charges apply based on the source, destination, and amount of traffic. Here are some general tips for when you start planning your architecture:Avoid routing traffic over the internet when connecting to AWS services from within AWS by usingVPC endpoints:VPC gateway endpoints allow communication to Amazon S3 and Amazon DynamoDB without incurring data transfer charges within the same Region.VPC interface endpoints are available forsome AWS services. This type of endpoint incurs hourly service charges and data transfer charges.Use Direct Connect instead of the internet for sending data to on-premises networks.Traffic that crosses an Availability Zone boundary typically incurs a data transfer charge. Use resources from the local Availability Zone whenever possible.Traffic that crosses a Regional boundary will typically incur a data transfer charge. Avoid cross-Region data transfer unless your business case requires it.Use theAWS Free Tier. Under certain circumstances, you may be able to test your workload free of charge.Use theAWS Pricing Calculatorto help estimate the data transfer costs for your solution.Use a dashboard to better visualize data transfer charges – thisworkshopwill show how.ConclusionAWS provides the ability to deploy across multiple Availability Zones and Regions. With a few clicks, you can create a distributed workload. As you increase your footprint across AWS, it helps to understand various data transfer charges that may apply. This blog post provided information to help you make an informed decision and explore different architectural patterns to save on data transfer costs.Related postsExploring Data Transfer Costs for AWS Managed DatabasesBirender 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.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.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.
Data transfer charges are often overlooked while architecting a solution in AWS. Considering data transfer charges while making architectural decisions can help save costs. This blog post will help identify potential data transfer charges you may encounter while operating your workload on AWS. Service charges are out of scope for this blog, but should be […]
Birender Pal
Amazon EC2 Amazon RDS Architecture AWS Direct Connect AWS Site-to-Site VPN AWS Transit Gateway