How to reduce your AWS costs? Save up to $500k with these guidelines!
This article will detail how Back4App reduced the AWS bill from $55,492/month to $20,074/month and achieved more than $500k in annualized savings. We will provide practical guidelines based on our own experience handling AWS costs and share some tips that worked well for us.
AWS continues to innovate and dominate the cloud market. It’s grown so much that it has become a key component of Amazon’s strategy. I’m an enthusiastic AWS user, but my concerns about its complexity and cost have led me to explore ways to optimize cloud usage. While it offers an increasingly sophisticated array of services for many kinds of development requirements, it’s not always the most straightforward, fastest, or most affordable option. Ideally, you need to design your architecture to optimize costs as soon as you move to the cloud. This guide will help you to speed up your AWS cost optimization with real lessons learned during our cloud cost savings journey.
Here is a summary of what you will find reading this article:
- Ask for AWS credits and get up to $100,000;
- Move data transfer to Cloud Front and save up to 75%;
- Use private IP (not Elastic IP) and stop paying inter AZ data transfer;
- Reduce data transfer costs with GraphQL API implementation;
- Save up to 90% with using Spot Instances;
- Save up to 75% purchasing reserved instances on AWS Marketplace;
- Purchase reserved Elastic Cache nodes and save up to 77%;
- Backup your data in S3 and not EBS and save 75%;
- Implement Auto-scaling for idle resources;
- Go for North Virginia region and move away from Sao Paulo;
- Upgrade to new generation families and save up to 20%;
- Place an S3 endpoint in your VPC and enable Enhanced Network on EC2.
- Delete idle Load Balancers.
- Use new AWS Savings Plan and save up to 72%.
Here is how we reduced our cloud costs…
That’s is how our AWS bill looked like in January 2019. A total cloud cost of $55,492.
That’s is how our AWS bill looked like in May 2019. The total cost was $20,074.
These are the 10 Ways to Reduce your AWS Costs
Don’t move on before confirming your company is entitled to AWS Credits.
1. AWS Credits
First things, first! Before you do any other activities, please see if your company is entitled to AWS credits! That is how you can get AWS credits.
Ask AWS for Credits
That was our case! We were in 2016 and scaling up the company pretty quickly. Our AWS bill was starting to ramp up, and we had no clue or time to optimize the AWS costs. The company had no funding yet and we would either get AWS credits or die. We prepared a business case to our account manager showing how much we were growing and the benefits of AWS keeping our account. We showed him that we had no funding and would have to move to Google Cloud (they had offered us $100,000 in credits to migrate out of AWS) unless we got the credits. The response took around one week, and AWS provided us $100,000 in credits to be used for 12 months. That was a pretty good deal to AWS too! Since the credits are expired, we spent more than $750k with them.
Credits for Testing & POC Implementation
If you are going to test a new AWS service or instance type, ask for credits to your AWS account manager. The number of credits will vary depending on your monthly spending and total effort to implement the POC. These credits usually last only for three months, and you need to make sure to expedite the POC. In our case, we were able to get $3,000 in credits to test it out the i3 instance family.
Credits for Startups
If you are starting your company or have a startup, this is a great way to move forward. The credits amount range from $1,000 to $100,000 depending on how you present your request to AWS. There a couple of ways you can get these credits.
One of the main benefits of a Startup Accelerator is the perks they provide. As part of the perks are cloud providers credits. The amount you can get here will vary depending on the Accelerator you are approved. Top ones like YC, Alchemist, Wayra and 500 Startups will offer you $100,000 in AWS credits. In our case, we were accepted at Alchemist Accelerator and were entitled to $100,000 in credits. Unfortunately, we were not able to use the credits because we had previously used other credits. AWS does not allow you to sum up credits. For example, if you are accepted on two accelerator programs and get $100,000 credits on each, you will not be able to use the $200,000, but only $100,000.
VC Funds & Angel Groups
Some VC / Angel Groups will provide cloud credits as part of the perks package. In our case, we were able to get $10,000 promotional credits valid for two years from one of our investors. Unfortunately, we were not able to use the credits. Companies are not eligible for AWS Promotional Credits if they previously received a similar or higher amount of credit.
All major cloud players provide credits for startups
All major cloud players will offer credits to startups. At AWS/Google the amount of the credits will go up to $100,000, and at Azure, you may get $360,000 to be used for three years.
2. Implement an AWS cost-saving routine
The easy part is over and now let’s go for the hard work! There is no magic pill, and to reduce your AWS cost, you will need to work hard and have a regular cost monitoring routine! Reducing cloud cost has to be a part of your daily routine! Imagine how much you can save after 365 days! The amount of time you invest depends on the size of your organization and your AWS spending. I invest around 30 min/day to monitor the account and prioritize the cost reduction actions. On top of that of Back4App’s engineers spend at least 1 hour/day to implement cost reduction initiatives.
The first action we implemented was to create a simple excel spreadsheet (download below) and prioritize cost savings initiatives.
The main variables we used to determine the savings were:
- Cost Saving Potential — Maximum gains for a cost-saving action
- Complexity — How hard it is to implement the work and effort required
- Owner — Who will perform the action
In our case, the majority of savings related to the Elastic Compute Cloud usage, and that was the first item we started to tackle.
3. EC2 — Elastic Compute Cloud
Here are some guidelines on how to optimize EC2 spending.
Shutdown unused instances
The first thing you need to do when reducing EC2 spending is to shut down unused instances. There is no rocket science here, and most of the work is pretty straightforward. All you need to do is to list all your instances, download free excel sample, and categorize each one. In our case, we categorized our instances in 3 major categories:
- Instances that need to stay active
- Instances that can be stopped
- Instances that can be terminated
Don’t stop, but terminate instances
Terminate unused instances whenever is possible! If you only stop it, you will keep the EBS costs running!
Reduce oversized resources
This action is a little complex, and it’s essential to assess the instance size correctly. Please make sure you evaluate at least one week of data to increase the likelihood of correctly sizing the instance. The way we controlled it was categorizing instances in 3 main categories (download excel below)
- Correct Size
- Reduce Instance Size
- Increase Instance Size
The way to check the instance historical data is super simple, and on your AWS Panel, you need to go to Services, EC2, Instances, Running Instances, select instance, monitoring. An example of metrics that you can check is CPU Utilization.
Reduce instance size incrementally
Reduce instance size step by step. For example, don’t reduce the size from a t2.xlarge size to t2.medium. Firstly reduce it from t2.2xlarge to t2.xlarge. Monitor for one week, check how much of the resources are being used and implement the reduction cycle again. Doing this way, you will decrease the likely hood of having any downtime or making mistakes.
Use Reserved Instances
Reserving an instance may get you savings up to 70%. Please note that when you reserve an instance, you will pay 24/7 utilization during the entire reserved period. You will pay regardless you use or not the resources.
There are two types of reserved instances offering classes:
- Standard — You can sell on AWS Marketplace, cannot convert to another instance type, its cheaper than convertible instances.
- Convertible — Cannot sell on AWS Marketplace, can convert to another instance type, more expensive than Standard instances.
Convertible instances can be tricky
Convertible instances are very tricky! Every time you convert an instance, you can only upgrade the usage. For example, let’s consider the following situation.
- You acquired a t3.medium convertible reserved instance.
- You decided to convert the t3.medium instance to an m5.large instance.
You will be able to do that! After using the m5.large instance for a while, you want to go back to the original t3.medium instance.
That’s no longer possible!
You cannot downgrade a convertible instance, but only increase the amount you spend with it. So, please make sure you start with small convertible instances and increase it during the time. Don’t start with a large instance because you cannot downgrade it or sell it in the AWS Marketplace. If you make a mistake with convertible reserved instances, you are committed to a monthly payment for 12 or 36 months. At Back4App, the way we handle convertible instances is always acquiring t2.nano and upgrading it when necessary.
I prefer Standard Reserved instances to Convertible Reserved Instances. The reasons are:
- They are cheaper
- They have liquidity — It’s possible to sell on the AWS Marketplace at any given time
- You can buy it on AWS Marketplace with discount
Use AWS Savings Plan
AWS released this new flexible pricing model on Nov, 6th, 2019 and looks like as a much simpler way to save on computing power.
Savings Plans are a flexible pricing model that offer low prices on EC2 and Fargate usage, in trade for a promise to a steady amount of usage (measured in $/hour) for a one or three year cycle. When you sign up for Savings Plans, you will be priced the discounted Savings Plans price for your usage up to your commitment. For example, if you commit to $100 of EC2 usage an hour, you will get the Savings Plans prices on that usage up to $100, and AWS will charge any usage exceeding the engagement as per On Demand rates.
Here is how the process works:
- Go to the Billing Management Console
- On the left-hand side look for Savings Plan and click on it.
- The following page will open:
- On the right-hand upper side click on Purchase a Savings Plan.
- Now you need to choose between Compute and EC2 Savings Plan.
- For this purchase, I will choose Compute because it delivers more flexibility.
- Next step is to choose the term commitment:
- Two options: (I) 1 Year (II) 3 Years
- For this purchase, I will choose 3 years commitment to get the best savings rates.
- Now you have to choose the hourly commitment.
- I will choose $0.01/hour commitment for 3 years.
- It will implicate in a $262.80 upfront cost.
- Click on Add to cart.
- A new will page will open with the purchase information.
- Click on Submit order.
- Click on Submit order.
That’s it! You will start to capture the savings over all your computing power. No matter the region, instance type, instance sizer or tenancy. Pretty simple and effective!
Please refer to this article and know more about AWS Savings Plan.
How to calculate Savings Plan purchase amount?
Let’s consider you have an account that runs one m5.large Linux instance in the North Virginia region. The account will have the following on-demand computing cost:
- Hourly Cost: $0.096
- Daily Cost: $2.304
- Yearly Cost: $840.96
Now, let’s consider you want to purchase computing savings plans to reduce your costs, and your computing usage will keep exactly the same for the entire year. I will assume you will purchase a 1-year, all upfront package.
How much in savings plans should you purchase?
Should you purchase $840.96? The answer is NO! That’s the full on-demand price! Doing that, you will over purchase, and a percentage of your savings plan will not be used. The way Savings Plan operates is different from reserved instances, and please be cautious in buying it.
Let’s do the math here. According to AWS’ Savings Plan pricing page, the Savings Plan for the m5.large Linux instance will have a 31% discount over the on-demand rate.
- Savings Plan = On-Demand Price x (1-Discount Rate)
- Savings Plan = $840.96 * (1–31%)
- Savings Plan = $580.26
Be cautious with AWS Savings Plan
Please be aware that you cannot sell Savings Plan on the AWS Marketplace. As soon as you buy it, the commitment is for the entire period and you don’t have the option to revert the purchase. If you want to have the flexibility to sell instances on the AWS Marketplace, please purchase Standard Reserved Instances. Please read the paragraph below for more information about how to buy and sell on the AWS Marketplace.
Use AWS Marketplace for Reserved Instances
Reserved instances are great, but Reserved Instances purchased on AWS Marketplace are even better!
AWS Marketplace can be much cheaper
AWS Marketplace looks like a stock market! You can sometimes buy Standard Reserved Instances with pricing much more affordable in comparison to buying directly from AWS. The reason for that is simple; companies sometimes have superfluous instances that they are no longer being used and still paying for it. Reducing the list price is a great way to speed up the selling process.
I will give now a real example that happened with Back4App. I was looking for four r4.large reserved instances. I was able to find instances on the AWS Marketplace with effective rates with a 75% discount in comparison to on-demand pricing. AWS was selling the same reserved instance type with a 62% discount.
AWS Marketplace has flexible purchase terms
The other advantage of AWS Marketplace is that you can purchase instances with flexible period terms. AWS only provides 12 months / 36 months of options to acquire reserved instances. The AWS Marketplace is much more flexible! You can purchase, for example, reserved instances with a 15 months term for the same price of 36 months. Some companies acquire long term reservations (36 months), and before the reservation expires, they sell the instances on the AWS Marketplace. The new buyer will only use the instance for the remaining period. For example:
- Total Reserved Period: 36 months
- Original Byer: Uses the instance for 21 months
- Second-time buyer: Buy at the Marketplace and use it for an additional 15 months.
The main challenge to buy on AWS Marketplace is to find instances available. An excellent way to increase the likelihood of finding instances is looking for instances in several availability zones and not only on the availability zone that your instances locate. As soon as you purchase, it’s possible to modify an instance, and allocate it to a different availability zone, or transform it in a regional instance. The way to do it is pretty simple, and please follow the steps below:
- Step 1 — Go to Reserved Instances Dashboard
- Step 2 — Click on Purchase Reserved Instances
- Step 3 — On Offering Class select Standard
- Step 4 — On the upper right side of the Pop-Up window, select “Only show offerings that reserve capacity.”
- Step 5 — Click on Search
- Step 6 — Purchase an Instance from Availability Zone 1b
- Step 7 — Wait until the instance is active
- Step 8 — Select the instance that was acquired
- Step 9 — Click on the button Actions
- Step 10 — Click on Modify Reserved Instances
- Step 11 — Scope — Change AZ or select Region
- Step 12 — Click on Continue
- Step 13 — Click on Submit Modifications
Following these steps will allow you to purchase Standard Reserved Instances in any availability zone and modify it to your availability zone.
AWS Marketplace for non-US companies
Here is valuable guidance for users that do not have a US Legal entity. You will NOT be able to sell Standard Reserved Instances on the Marketplace unless you have a US Legal entity. If you run your company outside the US, you will be able only to buy instances on the Marketplace, but will not be able to sell it.
Use Spot Instances
I love Spot Instances! You can save up 90% using it and don’t require long-term commitment! The only disadvantage of Spot Instances is that AWS can terminate these instances with little to no warning (max of 2 minutes). So, this type of instance should be used only for fault tolerant or flexible workloads.
Use SpotInst to run Spot Instances
A safe way to run Spot Instances and minimize the downtime risk is to use the SpotInst platform. This service will connect to your AWS account and manage the Spot Instances allocation. In the event, AWS terminate an instance this service will replace the instance for an On Demand one and prevent downtime. The pricing is also pretty smart, and they charge 20% of the net savings (between on-demand and spot price).
An excellent use case for Spot Instances is to run secondary database servers and also to auto scale applications. Use SpotInst to manage spot allocation, and most likely, you will never face any downtime related to the use of this offering class.
Software development company? Join our Partner Program now!
Auto-scale ( Idle Resources, Automate start/stop of EC2 instances)
AWS Auto Scaling monitors your applications and automatically adjusts the capacity to maintain steady, predictable performance at the lowest possible cost. You configure the auto scaling to automate the start and stop of EC2 instances. Auto-scaling groups take into consideration resource utilization like CPU, API Requests, or start/terminate times.
To fully minimize costs, you should use Autoscaling + Spot Instances + Reserved Instances. Let’s see this real situation we faced here at Back4App. The workloads on our application servers vary throughout the day. The quantity of requests we receive is not flat and has peaks of usage during specific times during the day. The way we tackle this problem is by allocating reserved instances for the baseline of usage (minimum level) and scaling up with spot instances. The image below is helpful to understand the configuration we use. Here is how much you can save:
- Reserved Instances: At Back4App, we have a blend of 12 months / 36 months standard reserved instances. Our average saving is 50% in comparison to on-demand costs.
- Autoscaling: We start/stop instances based on the total API requests each instance receives. We have three peak usage periods during the day, and the savings compared to keeping the idle resources running 24 hours on maximum workload is around 75%.
- Spot Instances: We have a blend of two family types running on Spotinst to maximize the uptime. Our net saving is 55% in comparison to on-demand pricing. That’s our net saving and considers the entire amount we have to pay to SpotInst. Running the spot instances directly on AWS would lead us to an approximate 70% saving, but would increase the availability risk. We like to play safe and decided to give part of the savings to SpotInst.
Tune your scaling
Tune Your Scaling with Vertical / Horizontal Scaling (Cloudformation)
Select the correct AWS Region to minimize costs
Cost varies by region! Choose the wrong one, and you will end up paying a lot more.
- Cheapest regions are: North Virginia, Ohio and Oregon
- Most expensive regions: Sao Paulo, Sidney, and Hong Kong
Take the following example:
- 4 x t3.medium instances
- 30GB EBS allocated for each instance
- 1TB total data transfer
This configuration will cost 102% more in Sao Paulo in comparison to North Virginia.
- $221.65/month cost in North Virginia
- $449.05/month cost in Sao Paulo
Comparing instances is a time-consuming process using AWS Pricing Calculator or the AWS Pricing API. Please checkout the EC2 Pricing Comparison Tool for a simplified comparison.
Centralizing your operation in a single Region has additional benefits.
- Will be much easier to manage your reserved instances allocation
- You will not incur in regional data transfer.
We at Back4App were not able to centralize all the services in North Virginia because of the scale of our operation and due to clients requirements. We decided to create regional clusters in the USA, Europe, and Asia. We centralize operations under these clusters and scale each region as much as we can.
Upgrade previous generation resources
AWS launches new instances types from time to time. The new generation instances are more affordable and have more processing power.
Old Generation Instance
3.75 GiB Memory
New Generation Instance
4 GiB Memory
The new generation instance is 15% less expensive and has 6% more processing power!
Enable enhanced network
Enable enhanced network for better instance performance!
Select the correct Instance Family
AWS provides several instance families that are optimized to meet multiple use cases.
- General Purpose
- Storage Optimized
- Compute Optimized
- Memory Optimized
- Accelerated Computing
Choosing the family type wisely will make you have the best usage of resources according to your application requirements. Let’s consider that your app is a compute-intensive application, for example, a multiplayer game. In this hypothetical scenario processing power will be more important in comparison to other variables like memory or network. So, acquiring a Compute Optimized instance will allow you to achieve the best price per compute unit.
You can compare the pro and cons of each instance family using this EC2 Pricing Comparison tool.
Delete Idle Elastic Load Balancers
Load balancer charges are a function of requests processed and hours running. So, if you have idle load balancers make sure you delete it. Otherwise you will still pay $0.025 per hour (Classic LB in North Virginia). Please see pricing details here.
4. EBS — Elastic Block Store
EBS delivers persistent block storage volumes for use with EC2 instances in the AWS Cloud. Each Amazon EBS volume is replicated within its Availability Zone to protect you from component failure, offering high availability and durability. The cost for each GB stored depends on the type of volume you are going to store data. The most commonly used volumes are General Purpose SSD and Magnetic.
General Purpose SSD
EBS Type — SSD x Magnetic
Start mapping your EC2 instances and download this spreadsheet to help you. For each instance, determine if the volume is Magnetic or SSD.
- Choose Magnetic over SSD whenever is possible.
- Replace SSD volumes whenever is possible.
EBS Size — Reduce Oversized Volumes
The second action to save EBS costs is to determine the size of each attached volume. It’s common to have oversized volumes and unused capacity. Download this spreadsheet to know more.
Terminate Instances — Stop will keep EBS Costs
Stopping an instance will not prevent you from having EBS costs! Your volume will continue to be stored, and the bill will come! If you don’t need the instance and the data anymore, terminate the instance! This action will stop both EC2 and EBS costs.
AWS will incrementally allow increasing EBS sizes, but will not allow you to decrease it. So, generally speaking, it’s better to have smaller volumes rather than large ones and only use EBS volumes when you need to.
Let’s simulate how costly this can be. Let’s assume you run 10 x t3.small instances and each instance has a 50GB SSD EBS storage. The monthly price will be as follows:
- EC2 Monthly Cost = 10 x $15.23 = $152.30
- EBS Total Size: 10 x 50GB = 500GB
- Cost/GB: $0.10-month
- EBS Monthly Cost: $50.00
- Total Cost: $182.30
This simple example shows EBS can cost up to 32% of EC2 charges and plays a signification role on your AWS bill. This a typical hidden cost and has to be controlled and monitored.
Evaluate ephemeral storage
Evaluate also the pros/cons of ephemeral storage. On the pro side, you will not face EBS hidden costs, will get lower latency and will be able to get reserved instances discounts. On the downside, you may not use all internal storage available (and still pay for it), and the implementation of spot instances will be more complicated.
Delete Unattached Volumes
Another action that will save you money is merely deleting unattached and unused volumes.
Use S3 to backup data
EBS is at least twice as expensive as S3! Generally speaking, you should preferably backup data on S3 and not on EBS. Please make sure your backups also run incrementally and are deleted periodically.
Software development company? Join our Partner Program now!
5. Elastic Cache — Reserved Nodes
What very few people know is that you can purchase reserved instances for Elastic Cache. The savings are pretty good and detailed below:
- 1 Year Reservation — 65% discount
- 3 Years Reservation — 77% discount
The process is similar to acquiring EC2 reserved instances. To obtain a reserved node, you need to follow the steps below:
- Go to Elastic Cache (not to EC2 reserved instances)
- Go to Reserved Nodes
- Click on Blue Button Purchase Reserved Node on the top right-hand side
- Select Redis or Memcached
- Select Node Type
- Select Term (1 or 3 years)
- Offering Type (Light, Medium, Heavy)
- Click on Next
The other cost reduction actions regarding Elastic Cache are pretty much the same as EC2. You need to shut down unused nodes and reduce the oversized node.
There is no AWS Marketplace for Elastic Cache
Please note there is no Marketplace for Reserved Nodes! Before purchasing, make sure you will use the node for at least one year.
6. Data Transfer
This cost variable can get out of control pretty quickly! It’s very complex to manage and hard to discover from where to where the data is flowing. On top of that, there are several types of data transfer. For example, data transfer out, transfer between regions, transfer between AZs, S3 data transfer, etc.
I will detail how Back4App reduced data transfer costs and also how to monitor it.
How to reduce AWS data transfer costs?
Here are some practical procedures that will help you to reduce transfer costs.
Connect your S3 endpoints to Cloudflare or other CDN service.
This simple action can reduce your S3 data transfer costs in 5x depending on how much cache you have.
Elastic IPs — Choose Private IP whenever possible
That’s a good one! AWS pricing calculator says data transfer-in is free to EC2 instances, but it also has an input box for “Public IP/Elastic IP Data Transfer.”If you choose to communicate using your Public or Elastic IP address or Elastic Load Balancer inside of the Amazon EC2 network, you will pay Intra-Region Data Transfer rates even if the instances are in the same Availability Zone. For data transfer within the same Availability Zone, you can easily avoid this charge (and get better network performance) by using your private IP whenever possible.
Use single AZ — Availability Zones
Use single AZ instead of multi-AZ for another significant saving. Avoid or stop data transfer between regions.
Inter Region Data Transfer
Here are some ways that will let you reduce Inter-Region Data Transfer:
- Store your files locally on S3. Storing in another region will make you incur in regional data transfer.
- Backup your data in the same AWS region.
Implement GraphQL APIs
One of the significant benefits of GraphQL is reducing over fetching and consequently, data transfer out. Replacing REST may be a challenging task depending on how your app is structured, and it’s essential to estimate the cost reduction potential before proceeding. Other alternative is to implement GraphQL incrementally for new projects or features. Please read the tutorial below for details of how to implement GraphQL APIs.
Getting started with Parse GraphQL API
You want to start using a GraphQL API for your Parse app running at Back4App. If you have already created an app at…
Data transfer volume discount
That’s pretty hard, and the volume you need it’s incredibly high. This action may only apply to enterprises or large accounts.
You can get huge savings implementing this action! This action will also improve the performance of your application and reduce overall latency. That’s a win-win implementation. Please refer to the Cloudfront topic to read more details about it.
How to monitor data transfer costs?
There are two simple ways to monitor data transfer costs.
- Cost Explorer
The way both reports consolidate data is different, and looking at both statements will provide a better overview of how you are spending money on data transfer.
To access the Cost Explorer report, you have to go to My Billing Dashboard and Click on Cost Explorer. Select the report Spend by Service View and a new window will open. A pre-built report with the last six months will open and let’s start with it. Please note that on the Service Colum there are NO data transfer costs! These costs hide inside the filters, and you need to dig deeper to discover it.
To find data transfer costs, you have to filter as follows:
- Click on More Filters and the filters will expand
- Select Usage Type Group
- Now data transfer start to appear
- Select Data Transfer — Inter AZ
- Select Data Transfer — Internet Out
- Select Data Transfer — Region to Region Out
- Select S3 Data Transfer Out
- Click on Apply Filters
After filtering the new report will look like this one:
Now you have the cost breakdown for data transfer, and you can determine where the data is coming out, either from S3 or EC2. If you wish you can implement a similar process and further breakdown the costs for each region and AZ.
Another way to visualize the data transfer costs via the billing report. Please go to My Billing Dashboard and click on Bills on the left-hand side.
The report will look like this:
Please note this already has a pre-built breakdown showing EC2 data transfer costs. Clicking on Data Transfer, you will have an analysis by region.
Selecting the Region, you will have a bandwidth breakdown by data transfer type (transfer out, inter AZ, inter-region).
Software development company? Join our Partner Program now!
7. Cloud Front
On-demand costs for Cloudfront are reduced pretty quickly as soon as you increase your volume. Let’s consider a 100TB data transfer. It will cost $0.060/GB, which is around 15% lower in comparison to the same volume on ELB data transfer.
Cloud Front Private Contract & Volume Pricing
Here is the best way to reduce data transfer costs! AWS is willing to leverage its CloudFront service, and depending on your volume, you can minimize CloudFront transfer out to a $0.02/GB rate. That will most likely demand a two years commitment, and if you plan to use AWS for a while is a great path to follow. To move forward, you have to contact your account manager and ask for a CloudFront Private Contract.
Amazon CloudFront SSL-Cert-Custom
Check if you are using this certificate. It costs $20/day, and you can get the same certificate with Cloudflare for $25/month. With the Private & Volume Pricing contract, you will not be allowed to connect to other CDN services, and this action will not be possible.
8. S3 — Simple Storage Service
Here some useful guidelines to reduce S3 costs.
S3 VPC endpoint
An excellent cost-saving initiative that most people fail to use is the S3 VPC endpoint. Placing an S3 endpoint in your VPC gives any traffic to S3 its internal route and AWS won’t charge you like public traffic. Depending on your volume, it’s possible to have reductions in the thousands of dollars per month range with this one method.
Use the correct storage model and appropriate storage class
There are five fives of storage models:
- Redundancy across AZs
- Low latency and high throughput performance
- Resilient against events that impact an entire Availability Zone
S3 Infrequent Access
- Ideal for long-term storage, backups, and as a data store for disaster recovery files.
- Redundancy across AZs
- Less frequent Access
S3 One-Zone Infrequent Access
- Less frequent Access
- An excellent choice for storing secondary backup copies
- A secure, durable, and low-cost storage class for data archiving
- Redundancy across AZs
- Retrieval options that range from a few minutes to hours
S3 Glacier Deep Archive
- Lowest-cost storage class and supports long-term retention and digital preservation for data that may be accessed once or twice in a year.
- Retrieval time within 12 hours
- Redundancy across AZs
S3 API costs can be tricky
Please be aware every time you move objects from one storage class to another, you will be charged based on the number of requests. That can be very tricky! I will share a situation that happened at Back4App. One of our customers’ stores millions of small objects, and the data is rarely retrieved. We initially stored these objects on the S3 standard and decided to move them to S3 Glacier to reduce costs. So far, so good! What we did not realize was that AWS charges $0.05 for each 1,000 Glacier requests! In this situation the number of objects was huge and the size of each object quite small. So, the upfront cost we faced did not pay off! Before moving objects between storage classes, it’s essential to take into consideration the costs related to S3 requests and conduct payback analyses.
Delete unused S3 data
The most simple and effective way to save costs on S3 is simply deleting old and unused data. Look for old backups and unused S3 buckets. Make the analyses and delete data if possible.
Software development company? Join our Partner Program now!
9. Choose AWS Support Type Wisely
There are four types of support levels:
- Basic — Free
- Developer — $29/mo or 3% of monthly bill
- Business — $100/mo or 10%-3% of the monthly bill depending on the volume
- Enterprise →$15,000
We tried Business support, and we were not happy with the results. In our perspective, it cost too much for the guidance and level of assistance it provides. I cannot comment on Enterprise support because we never tried it.
Use your AWS regional account manager
Use your regional account manager and solutions architect as much as you can! They are segregated from the central support team and will be able to provide much more personalized service. The AWS team is very skilled and helpful!
The guidance they provided to us in terms of advanced security settings and GDPR implementation was best in class! I was impressed with the technical knowledge and commitment from the team to help us to achieve better results.
During November 2021, our regional account manager (a new one) was amazing, helping us get a refund for a business support fee. This type of support makes me think twice before moving to other cloud providers and increases my trust in AWS.
10. Monitor & Control
It is of the absolute importance to keep a strict billing regimen and know your daily spends. You need to provide yourself with detailed monitoring of your costs and spend time looking at it every day. Imagine the volume of savings you can achieve after 365 days!
Daily monitoring will help you to identify suspicious uptrends and take action as soon as possible. Best practices related to Monitor & Control are detailed below:
- Regular Monitoring.
- Some useful reports are:
- Billing & Cost Management Dashboard
- Monthly Bills
- Cost Explorer — Monthly Spending by Service View
- Cost Explorer — RI Utilization
- Cost Explorer — RI Coverage
- Tag Everything
- Measure The Baseline, Monitor, Alert On Exceptions
- Establish A Responsibility Model
- Use Cloudwatch and Trusted Advisor to monitor costs
- Consolidate your billings and get volume discounts
11. Architecture Redesign
Architecture redesign is commonly the most time-consuming step to implement. It may take weeks or months, depending on how large/complex your infrastructure is.
Our experience at Back4app shows there are several more straightforward steps to perform before this one. Generally speaking, incremental improvements will provide you short term substantial savings. Cash in these savings first and gain experience to implement a best in class architecture redesign.
There is no magic pill to reduce AWS costs! You need to establish a regular routine to monitor your expenses, determine your cost savings priorities, and work like crazy to meet your AWS savings goals.
Here is a review of the actions that helped us to decrease our AWS bill.
- Terminate unused EC2 instances
- Reduce oversized AWS instances
- Move data transfer flow to CloudFront
- Upgrade to new generation instances
- Implement best practices like enhanced network
- Backup data on S3
- Reserve instances on AWS Marketplace & Reserve Elastic Cache Nodes
- Have a right blend of Spot, Reserved and On-Demand Instances
- Automate autoscaling options
- Mix storage between S3 Standard and Glacier
13. Contribute to this article
So, what do you think about the results we achieved? Has it helped you figure out how to reduce AWS costs?
If you would like to contribute to this article, please email me at firstname.lastname@example.org , and I will be happy to include your addition.
Your comments are also welcome!
Would you like to know more about reducing AWS costs? Please read these other articles:
Ten things you can do today to reduce AWS costs
Reducing your AWS monthly bill by 30%
14. Contributions made to the article by readers
Maxim Melamedov from Cloudvisor.
Reserved Instances in RDS and Redshift
You can benefit from reserved instances discounts for your managed databases as well.
However, those RIs cannot be purchased/sold on Reserved Instances Marketplace.
Cleanup your account
Periodically delete unused or unattached assets like IP addresses and EBS volumes.
Those items accumulate over time and lead to unnecessary cloud spend.
15. Other articles
Here is some other topics you may be interested:
What is a backend as a service?