How to Optimize AWS Data Transfer Costs

Amarjit Singh
branch-engineering
Published in
3 min readMay 25, 2018

When system administrators were only dealing with local data centers, they didn’t have to pay attention to data transfer costs. Once the infrastructure was set up, data transfers were free, so design changes over the long-term didn’t impact network operational costs. But in the cloud environment, every data transfer is measured. When you are transferring information between virtual private cloud (VPC), availability zone (AZ) or external links, you are getting charged for every bit of data. So system administrators need to pay more attention to the factors that affect data transfer in an AWS environment.

AWS doesn’t make the data transfer charges easy to understand. As a result, for most organizations, data transfer costs on AWS are shrouded in a cloud of mystery. From the AWS Console, it’s not possible to monitor the data transfers of your instances and applications. You can use the AWS generated or user-defined cost allocation tags to gain more insights, but it can be a time-consuming process. AWS offers various data points that can be analyzed to get better visibility into data transfer costs, however.

Understanding Data Transfer Charges

On AWS, data transfer cost depends on the source and on the destination. The below diagram shows the various cost points from a data flow perspective:

As long as cost allocation tags are enabled, the AWS Cost Explorer can show data transfer for each tagged instance. Having a granular view of the various components of your system is important for understanding your overall data transfer costs. The tool will help you visualize the information and better manage your resources. Below is a screenshot of the AWS Cost Explorer:

You can use the following criteria to further refine and analyze the costs:

· Data transfer cost as an aggregate number for VPCs/AZs/Regions.

· Aggregate cost for outbound data transfer to the Internet.

· Cost of data transfer by an application or instance.

· Internal data communication cost. (Remember, any communication over public IP, even in the same AZ or VPC is charged.)

Cost-Optimization Through the Right Architecture

The placement of your resources will play a vital role in your data transfer costs. Here are some key factors to keep in mind during the architecture design:

· Availability: A multi-AZ architecture is highly available.

· Disaster: A multi-region architecture provides higher availability during a disaster in a single region.

· Security: Resources split across accounts or VPCs provide better security.

· Cost: Anytime resources are split across AZs, Regions or VPCs, data transfer cost would increase.

You should choose the architecture according to the needs of your application. For example, if a particular resource cannot provide high availability during an AZ or region failure, your whole application would be unavailable. In such cases, you would be paying higher costs of data transfer without the benefits of availability. Similarly, if VPC peering, routing, and VPN connectivity are not carefully designed, data transfer costs would increase without the benefits of isolation or security.

Use the following table as a guideline to decide what matters most to your architecture:

In Conclusion

In the cloud, system administrators have to rethink their approach to system architecture. Even though AWS provides a lot of new tools and resources, system administrators have to understand how their design will impact data transfer costs. If not optimized, the costs can add up and impact your bottom line.

Interested in the engineering challenges discussed here? Come help us out, and check out https://branch.io/careers/.

--

--