Does this scenario sound familiar?
You’re in your team meeting ready to hear about new features you’re adding to the development pipeline and other top priorities, when your manager comes in freaking out about cloud costs. Apparently, AWS EC2 pricing has skyrocketed and the CFO is on his case about reducing your AWS bill.
The pressure to save is ON.
This situation is all too common for most engineering teams as they strive to achieve the perfect balance between cost efficiency and ensuring future capacity requirements are accounted for.
So how can engineers take control of their AWS EC2 pricing? See our tips and tricks below:
1. Continuously right size AWS EC2 Instances
Right sizing is not just a one time deal. In fact, if you’re not right sizing fairly frequently (about once a month), there’s a chance you’re missing many opportunities to save on EC2. Not all instance types are created equal –each has various CPU, memory, and network resources that are made to fit specific workloads.
To keep AWS EC2 pricing down, you’ll need to ensure your EC2 instances are in line with the performance and capacity needs of your current workloads. Start by measuring your CPU and memory usage over the course of a month. Then, find instances that have reached a maximum CPU utilization and a memory usage of less than 40%. These are ideal candidates for right sizing.
You should then match your workloads with a family type that fits its CPU, memory, and network usage at its peak. AWS offers tools such as Amazon CloudWatch, Amazon EC2 Usage Report, AWS Cost Explorer, AWS Compute Optimizer, and others that help you analyze your usage, costs, and performance data.
While none of these tools automate the process, they do offer great insights to help you right-size accurately.
2. Remove idle or unused resources
Despite your best efforts, the likelihood is, there are probably resources within your AWS environment that have been deployed and paid for, but remain unused.
This usually happens when you have instances purchased On-Demand for non-production purposes such as QA, development, staging, testing, and others. Since these idle compute resources add to your AWS bill, it’s a good practice to continuously identify instances that have low usage rates for long periods of time. Once you find these instances, they should be immediately removed from your environment.
In addition, many engineers create storage volumes or snapshots that are dedicated to supporting specific instances or infrastructure. Once these instances are no longer needed, engineers delete the instance, but forget about the volumes or snapshots that were attached. These volumes, known as orphaned resources, continue to exist and remain paid for, but are not being used.
Whatever the cause, it is estimated that unused cloud resources costs businesses billions of dollars per year. So it’s best to get proactive by identifying and deleting them before they impact your AWS bill.
3. Use AWS Auto Scaling
If you’re looking for an effortless way to manage AWS EC2 pricing, AWS Auto Scaling is a real game-changer.
Created for scaling applications, the feature continuously monitors your application’s capacity needs and automatically adjusts resources to fit its current usage. According to AWS, Auto Scaling enables users to “setup application scaling for multiple resources across multiple services in minutes.”As a result, you’re able to optimize both performance and costs in one easy step.
Bear in mind that Auto Scaling simply uses resources you’ve already purchased to scale based on your capacity needs. Therefore, you must have a bank of Reserved Instances or Savings Plans for the pricing to be optimized as much as possible. Otherwise, Auto Scaling will continue to scale using On-Demand Instances.
4. Leverage RIs and SPs
This brings us to our next tip. Make sure to leverage RIs and SPs.
We love flexibility as much as anyone. And we hear you, committing to Reserved Instances and Savings Plans a year (or more) in advance is hard. Our needs fluctuate. We may create more features, onboard new customers, or create new functionalities that are difficult to know about when it’s so far into the future.
But hear us out. Reserved Instances and Savings Plans save AWS customers about 72% when compared to On-Demand pricing. That’s pretty significant if you ask us. So significant, that it might even be worth grabbing your calculator and Excel spreadsheet to forecast your usage.
If that’s not your style, you should check out Renovisor, which automatically buys and sells RIs and SPs according to your real-time needs.
5. Consider using Spot Instances
Spot Instances are unused EC2 Instances which AWS offers at a steep 90% discount from On-Demand pricing. The catch is once that Instance is needed at an on-demand rate, you will only have two minutes notice to move your workloads.
So needless to say, this is not a great solution for mission-critical workloads. However, it’s ideal for testing, Big Data analytics, CI/CD, machine learning, and other similar use cases.
Managing your AWS EC2 pricing is a constant balancing act. And unfortunately, there’s no easy way to get around it. Typically, it takes a lot of time, careful planning, and constant monitoring to ensure both costs and performance are optimized.
But thankfully, there’s a light at the end of the tunnel.
Renovisor automates many of the mundane processes that make managing AWS pricing a pain. It automatically buys and sells RIs and SPs as well as identifies and disposes orphaned cloud resources. This means you can spend less time calculating and planning, and more time developing cool technology.