If your business depends on AWS cloud services, you’re probably familiar with the experience of having unexpected, hidden charges crop up on your monthly invoice. At times, the AWS cost structure can be quite opaque, making it difficult to accurately gauge in advance the costs of hosting a given application.
One of the most common sources of unanticipated AWS charges is the service’s data transfer fees. In fact, they can be so expensive that some top companies, like Netflix and Pinterest, have racked up hefty data transfer bills on AWS — up to $30 million a year. To help you navigate AWS data transfer pricing, here is a detailed breakdown of how data transfer fees are structured and some suggestions on how you might go about mitigating them.
What Are AWS Data Transfer Costs?
AWS charges for transferring data between its platform and the internet, and also within AWS between services such as EC2 or S3.
Some AWS services include the cost of moving data in or out rather than billing a separate data transfer fee. This means that sometimes, there isn’t a distinct data transfer cost, as when using AWS Kinesis.
In other situations, there is a cost to move data one way, but not in the other direction, as with transferring data to and from AWS S3 across different regions. Other situations incur different costs for transferring data in or transferring data out, as when transferring across EC2 instances in different availability zones.
Due to the number of variables, controlling data costs requires an understanding of how your data is moving around, as well as the charges associated with your transfers.
AWS Data Transfer Pricing Cost-Saving Tips
As noted, AWS data transfers can really add up. The following guidelines will help you control your AWS data transfer costs.
1. Limit outbound data transfer where possible.
The simplest way to reduce AWS data transfer costs is to look for means by which your application can cut the fat regarding sending outbound data. AWS egress pricing is where most data transfer costs really pile up. As you can see from the below AWS Data Transfer Pricing Chart for the US West (Oregon) region, inbound data is not taxed, whereas outbound is (on a sliding scale).
Of course, for some applications restricting outbound data is not possible. If you’re serving any sort of media content over the internet, particularly images and videos, you will quickly rack up outbound data transfer fees. And while you’ll notice that the price per GB decreases as you transfer more outbound data, this isn’t much of a comfort when you consider it in terms of total spend.
Suppose for the sake of an example that your application is serving 150 TB of data per month — something not out of the realm of possibility for large-scale enterprise applications. Even using the cheapest rate of $0.05/GB you’re looking at 150TB = 150,000GB *$.05/GB = $7500/month in AWS data transfer costs alone!
(AWS Data Transfer Cost Breakdown – Representative Example)
2. Add “cost allocation tags” to your instances and load balancers.
The first step in AWS cost reduction is obtaining insight into where your application is incurring the highest usage fees. To assist in this process, AWS provides a handy feature called cost allocation tags which can be used in conjunction with the AWS Cost Explorer to analyze which instances/services data transfer fees are stemming from.
Cost Explorer will identify the EC2 and other transfer costs driving your bill higher. By applying these tags to your instances and load balancers, you can narrow in on which ones are generating the highest AWS data transfer costs and further filter these by type: CloudFront (out), Inter AZ, Internet (In), Internet (Out), Region to Region (In), and Region to Region (Out).
(Applying Cost Allocation Tag Filters)
CloudZero can help you avoid unforeseen data transfer costs with real-time alerts. Sign up for a free demo to see how.
3. Use Amazon CloudFront.
Once you’ve used a tool like the AWS Cost Explorer to identify pain points, you can look to ease these by using an additional AWS service like CloudFront. CloudFront is designed specifically to reduce charges arising from EC2 to public internet transfer such as one might incur from hosting a website which serves content to the public.
By caching your content in CloudFront, you can greatly reduce the charges incurred. CloudFront offers a free tier which entitles customers to 50 GB outbound data transfer and 2 million HTTP requests per month for the first 12 months. Beyond that, CloudFront data transfer is charged according to the following table.
4. Keep data transfer within a single region.
When transferring data between AWS services such as EC2 and S3, architect your application to ensure that these transfers are happening within a single AWS region. Beyond this, ensure that you’re transferring data via private IPs, not public or elastic IPv4/IPv6 addresses. Assuming you adhere to these caveats, your data transfer cost will be $0.
5. Keep EC2 data transfer within a single availability zone.
When transferring data, notably between EC2 instances but also RDS, Redshift, and other service instances, you will be charged $0.01/GB in each direction unless you keep the data transfer within the same availability zone. The advice to transfer data using private IP addresses from the previous section still applies. To incur the lowest possible costs, combine solutions four and five, and keep data transfer confined to a single availability zone within a single region.
6. Use the cheapest available AWS regions that make business sense.
Data transfer costs can vary widely due to AWS region pricing. AWS data transfer costs for certain regions are cheaper than others. Regions within the United States and Canada are normally the most inexpensive, whereas Singapore, India, and South America are among the most costly. Unless there is a compelling business reason to host your services in these countries, opt for the more cost effective North American regions.
7. Use a third-party monitoring service to help you identify your data transfer pain points.
By using a third-party AWS cost monitoring service such as CloudZero, you can be alerted to unforeseen and unexpected data transfer charges as they arise. Using proprietary machine learning algorithms, CloudZero will identify which services are causing you to incur high data transfer costs and suggest fixes you can make to reduce your overall spend.
Need Help Managing AWS Data Transfer Costs (and Other Cloud Costs)?
Controlling AWS data transfer costs is important, but it’s only one aspect of cloud cost management. Even more important is making sure that what you are spending on all cloud services aligns with and supports your business goals and strategies. When you move beyond just controlling costs and focus on advancing your business objectives with your cloud spend, you’ve moved from cloud cost management to cloud cost intelligence.
CloudZero is the only cloud cost management tool that pulls in both billing and resource data from across your AWS account to automatically group costs and surface insights. We run the data through a powerful data normalization and machine learning engine to associate costs with the activity or teams that produced them, giving you a clear picture of how your costs are trending and where you need to focus to control nonessential costs. If you’d like to see how cloud cost intelligence can boost your bottom line, sign up for a free CloudZero demo.