Stop Wasting Money, Start Cost Optimization for AWS!

PANKAJ KUMAR
Opstree
Published in
5 min readSep 22, 2020

Generally, organizations move towards AWS to furnish their foundation with the capacity to develop and extend their abilities and because they can only pay for the resources they use. An unfortunate side effect of this methodology is that little costs regularly go unnoticed and can add up over time, prompting high monthly bills. The monetary effect of the current pandemic is forcing the world to adjust spending within their organizations. Everybody is turning over every rock to discover approaches to cut waste without impacting business. One way to get fast cost savings is to eliminate wasted spend on cloud services.

Organizations waste an average of about 35% of their cloud spend. With the implementation of a focused effort can save an organization as much as 30% to 35% on their cloud spend within a few months. Unlike numerous other IT costs tied to long-term contracts, cloud spend can provide quick wins in any cost-savings initiative. Getting solid cloud cost-saving practices in place will also help ensure ongoing efficiencies as cloud use accelerates even faster in a post-pandemic world. If you’re trying to reduce expenses the following practices help limit your AWS expenditures and protect your bottom line.

Recently I was working on a project where the previous application team was handling the infrastructure and maintenance activities without any DevOps perspective. Therefore, the client wanted to maximize automation and reduce operational and maintenance costs wherever possible. The initial step to conquer any issue is to comprehend our concern and afterward investigating our approaches to determine it. So in the very first step, we started analyzing our expenditure by bills. For analyzing our spending on resources we used AWS cost explorer.

After analyzing, we were able to create a list of our expenses for AWS services that were impacting our bill.

1. EC2 = 30%
2. RDS = 20%
3. CloudWatch = 9%
4. Cloudfront = 6%
5. Other = 35%

After shortlisting our pillars to be worked on we started analyzing where and how we can save our costs. As per shortlisting, we found out that 50% of our cost impact is from EC2 and RDS alone. So the first step which we have taken to reduce our expenses is to minimize the cost of EC2, RDS, and then others. The following are a few practices that helped me while reducing our cloud expenses.

So we started analyzing the utilization of our resources on EC2. For identifying the instances that were not optimized fully, we have used the AWS compute optimizer tool.

Further digging in Over-provisioned instances we can get the recommended instance type which we can use in place of over-provisioned EC2s.

After analyzing reports for utilization we came to know that 60% of our resources were underutilized and using only 30–40% of CPU and memory. After optimizing the EC2 resources, we have acquired a few things which can be done to save almost 40–50% on the cost of our EC2 service.

RDS Savings
For cost optimization on RDS, the key factor is to choose the correct instance type. We can analyze the usage of our RDS by using CloudWatch metrics for the past few months or weeks. After this, we can opt for the right instance size for our workload. One more factor affecting our bill is RDS snapshots which act as a backup of our databases. We can remove old snapshots that were not required to cut a few more slices from the RDS cost. Another thing to look in RDS is the I/O cost which is also a part of RDS billing. If we do not require Multi-AZ deployment then we should restrict it to a single AZ as I/O will be doubled if we are using Multi-AZ because Amazon RDS will synchronously replicate our data to the standby database instance. The biggest rock to turn in RDS cost optimization after this is to use Reserved instances which will reduce our RDS cost by almost 50%-60%. For using Reserved instance we need to commit over a one or three year term along with the utilization.

We Can also track the coverage of our RDS Reserved Instances under

Cost Management -> Reservation -> Coverage Report

CloudWatch Savings
AWS CloudWatch charges consist of a lot of components such as custom metrics, dashboards, alarms, events, etc. We were able to operate many services for free within its free tier limit

Generally, our CloudWatch bill goes up unexpectedly over time. To manage our CloudWatch spends we can keep track of a few things which can help us reduce our bill.

Toppings
Apart from the above major impacting components, we can do some cherry toppings to remove a few more cuts from our bill by using tad keenness.

Note: Gifs and images are just for reference purpose

Gif Ref — https://media.giphy.com

--

--