Have you ever left the oven on? How about running up $60,000 in AWS bills without knowing what you’re using?
While human error can easily run up your AWS costs, there’s typically a really good technical reason for the expensive charges your company is receiving. Not only is it important to know how to spot errors, it’s just as important to know how you can carry out AWS cost reduction without risking a collapse of your critical systems.
That’s why we’ve written this post! We’re going to teach you what you need to do in order to cut your AWS costs, while staying aware of the repercussions of doing so. After all, there’s no point in gutting your spending if your product collapses as a result.
This post is split into the following sections:
- Why do you want to reduce your costs?
- 9 AWS cost reduction methods
- The secret weapon to AWS cost reduction
Let’s get started.
Why do you want to reduce your costs?
Before starting to reduce your costs it’s important to consider why you’re doing this, as approaching with the wrong mindset can have disastrous consequences for your product’s performance. Even if you have no control over the reason why you need an AWS cost reduction, you need to know what’s expected of you and be able to give realistic estimations of how any actions will affect your team.
Are you reducing costs to simply try and optimize your setup? This is a perfectly valid reason, and you should be optimizing your operations wherever possible to free up funds to be used in more crucial areas. Plus, it’s never a good thing to be paying for something you don’t need or aren’t using.
Are you being forced to cut your AWS costs due to downsizing or through budget decisions that are out of your hands? This can be tough, especially because it can be incredibly difficult to relate and justify your AWS spend (no matter how vital to operations) to anyone who isn’t intimately familiar with AWS already. Yet you still need to investigate where cuts can be made and, more importantly, relay how those cut resources will impact product performance to those requesting the cuts.
The worst thing that can happen is for you to cut costs as requested, then be lambasted for your reduced capabilities as a result of those cuts.
Once your team is on the same page regarding what needs to happen, why you’re reducing costs, and how strict any targets for cost reductions are, you can start to use the following methods to slash spending.
9 AWS cost reduction methods
Here are 9 AWS cost reduction methods that you can use to stay at the top of your game. Don’t worry - they’re not 9 different shades of “optimize cost and usage on X part of AWS”. We’re more interested in giving you tangible, actionable advice that you won’t hear from every other site out there.
So let’s dive in!
AWS cost reduction #1: Know your EC2 pricing models
Starting out basic, you need to know what AWS EC2 pricing models are available to you and which would suit your needs best. We’ve written in-depth before on the different EC2 instance pricing models, but here is a brief overview.
- On-Demand: The “standard” pricing plan where you pay hourly for the instances you launch. You pay for what you use and stop paying when you shut down the instance. Simple, flexible, and expensive if you forget to close your instances when you don’t need them.
- Savings Plans: By committing to 1 or 3 years of usage you can save up to 72% of your costs versus On-Demand pricing. They’re great for cutting costs on instances that you know you’ll be using heavily for extended periods of time, but aren’t if you need more flexibility or are uncertain of your long-term usage.
- Reserved Instances: Similar to Savings Plans with a commitment to 1 or 3 years of instance usage, but here you’re effectively purchasing the instance for that time. This means that you can resell your Reserved Instances on the Amazon Marketplace to get some of the cost back if you don’t need it for the entire time. Be warned that selling them is not guaranteed and that you’ll never get the full cost of the instance back even if you sell it.
- Spot Instances: These are instances that are offered at a discounted price by Amazon due to low demand. However, once demand for the instance is back, yours will be the first that is taken offline to fulfill that demand. They’re a little finicky due to the unreliability and the fact that you can’t guarantee that the instance you need will be available as a Spot Instance, but they’re nonetheless a great way to reduce your AWS costs.
- Dedicated Hosts: Physical EC2 servers that you purchase and are fully dedicated to running your instances. These are mostly useful for corporate compliance requirements, but are also a good choice if you want to fully manage your instances (especially if you already own the licenses for running them).
- Dedicated Instances: These are an easier way to meet compliance demands for dedicated servers than Dedicated Hosts, as Dedicated Instances are individual instances that you purchase for your sole use on a physical host. They take the onus off you for full instance and server management, but are comparable to Dedicated Hosts in price.
- Capacity Reservations: These are reservations that you can make for instances in a particular AWS Region for a specific amount of time. They don’t offer any inherent discount so they’re not great for reducing costs, but allow you to guarantee full usage and availability of instances on a much more flexible time scale than Savings Plans or Reserved Instances.
Knowing the difference between these options is your bread and butter for reducing your AWS EC2 instance costs, so learn them well, and analyze the usage of your instances to see which pricing model fits best for your needs.
AWS cost reduction #2: Measure and manage costs and usage
In the AWS Billing console you’ll find your Cost and Usage Reports (CURs). These are the only way to natively see what your costs and usage statistics are, so you need to get to grips with the tool and learn how to read them in order to find out where you can cut costs without affecting usage too much. There’s no way of effectively seeing and managing your AWS bill without them. (No, not even with AWS Cost Explorer.)
Having said that, we freely acknowledge that AWS CURs can be a nightmare to understand at the best of times. That’s why our final tip in the last section of this post will show you the best way of interpreting and managing your CURs to let you easily get insight into them and reduce costs with virtually no effort involved.
AWS cost reduction #3: Perform a usage type analysis
One of the major ways that the CUR helps over and above the Cost Explorer is the usage type analysis. This helps you group together sub-components of service costs based on similar characteristics. To do this, look at your cost and usage statistics (specifically via the “lineitem/UsageType” column) and sum the totals by each usage type. Then, you can contextualize each into sub-categories based on common resources, descriptions or regions - essentially putting them in the frame of what they’re being used for, who by, and what the return on your investments is.
This helps you to go beyond just comparing how much you’re spending and how much usage you’re getting out of those costs at a service level. You’re bringing invaluable context to costs and usage to show whether or not various elements of your AWS bill are useful enough to keep paying for.
AWS cost reduction #4: Don’t pay for what you don’t need
Speaking of which, it sounds simple but you need to be cutthroat about what you do and don’t need. If your usage statistics highlight a forgotten instance that isn’t being used, axe it. Got a Reserved Instance that was useful for 6 months but the project related has been shut down? Sell it on the marketplace to recoup some of your costs.
A major culprit of excess spending can be environments or workloads that aren’t used anymore, but were once rather important. Let’s say you run single-tenant environments for your customers and a customer canceled last month. Once you’re contractually clear of needing to retain their data, that entire environment should be deleted. Or how about that feature you were building last year that never got released? Consider holding on to the code only but get rid of any development or testing infrastructure that was built to support it.
In short, take action on what we’ve highlighted so far, and any other elements that you know aren’t bringing you any benefits.
AWS cost reduction #5: Identify resource wastage
Reducing costs isn’t always about cutting anything that isn’t being used; sometimes it’s more valuable to consolidate your resources to eliminate waste, even if that means increasing the usage of one element to take up the slack of another, barely used one. You could even reduce future costs by utilizing one of your existing low-usage resources to take on a new project that would usually require purchasing more resources.
This applies to everything from EC2 instances to AWS Lambda and S3, but nowhere does it apply more than with containers: ECS or EKS. Validate that all your nodes are operating at capacity, instead of with free space. If there’s free space, perhaps you can migrate workloads from a separate container group into this shared group?
How do you actually track resource utilization? AWS CloudWatch is about to become your best friend. Analyze the CPU and memory usage of all instances over a set period of time. If your utilization is always less than 50%, that’s a sign you’re paying for an instance size that’s too large. If your average utilization is super low, despite some spikes, that’s a sign you could benefit from auto-scaling, so that you only pay for the increased capacity when you need it.
Yet, even more than excess resources, there are lots of tools and configurations that you may be paying for but aren’t utilizing. Step through your CUR to find all your charges and assess whether the corresponding tool or configuration is worth keeping or to cut your losses and stop them altogether.
AWS cost reduction #6: Use EC2 Spot Instances
We’ve covered EC2 Spot Instances earlier in this post so this will be brief. However, it’s worth stressing just how much you can save by making use of the instances that are in low demand. If you have an operation that doesn’t require full uptime and isn’t time-sensitive, it can be worthwhile to run it purely on Spot Instances and simply pause operations when one isn’t available.
How do you know if Spot Instances could actually work for you? A spot instance is best applied when any server can be quickly and easily exchanged for another, and that any workloads running on a server can be terminated without warning and without business impact.
Let’s talk examples. First, if you use containers through ECS or EKS, you absolutely should be using spots for the majority of your nodes. These resources are all replicas of each other within a cluster, thereby making the actual hardware, or underlying virtual server’s configuration, easily interchangeable. Second, consider trying out spots on non-production workloads if you aren’t sure about your ability to fail-over when a spot instance is recalled. Once you iron out all the kinks, selecting the appropriate implementations for spot instances on production should be a snap.
AWS cost reduction #7: Make the most of Savings Plans
Your needs will change over time, especially as you introduce new elements to your product and scale your company and customer base. However, any changes you make can quickly become consistent features that bring your team a lot of value. If you can predict that from initial performance and income projections, you can majorly cut costs by swapping over to a Savings Plan as quickly as possible.
Pro tip: You can always save more with more specific plans! If you know you’ll be using a set instance family for the next year, consider using an EC2 Instance Savings Plan for greater savings than a Compute Savings Plan.
AWS cost reduction #8: Consider using Reserved Instances
If you’re unsure as to how long you’ll need to use an instance but still don’t want to pay full price, Reserved Instances can be a great way to do just that. While it’s best to use these for projects that are guaranteed to be necessary for at least a year, if you’re only sure of the next 6 months you can still reduce costs overall by buying an RI and then selling the remainder of the instance’s duration when you’re done.
Again, just remember that the less time left on the instance, the less that you’re going to get it for, that your instance will be competing with everyone else on the market, and that whether you sell it at all is based on the demand for one with the same specifications.
AWS cost reduction #9: Consolidate with AWS Organizations
AWS offers similar discounts to those of any physical product when ordered in bulk. The more that you use, the higher band of discount you can qualify for. That’s why grouping all of your accounts into a single AWS Organization is great for reducing costs.
When calculating the discounts that you qualify for in terms of your usage, AWS classes all accounts grouped into an Organization as one account. This means that you can qualify for much steeper price discounts than you ever would if they were assessed individually.
Let’s add another tip about buying through the AWS marketplace, then negotiating an Enterprise Agreement, or EDP:
- Research all the SaaS vendors your company uses on the AWS marketplace
- Contact them all to move your current contract (and its terms) to the marketplace. They can create a Private Pricing Offer (PPO) for you to make the purchase process smooth
- Once everything has been migrated, take your monthly spending and multiply by 12. If you exceed 500K you’re eligible for an EDP. Contact your account manager to negotiate your discount percentage.
The secret weapon to AWS cost reduction
We know how hard it can be to reduce your AWS costs. We’ve been through it ourselves, and are dedicated to helping everyone not go through the same pain of trying to interpret gibberish CURs and learn the intricacies of every AWS pricing plan.
That’s why Aimably can jumpstart your AWS cost reduction journey, right now.
Our AWS Cost Reduction Assessment will show you exactly where and how you can cut costs. We include the exact range of savings you can expect from taking specific actions, the risk that those actions will cause, and even prioritize them based on which will save you the most while allowing your engineering team to generate business results. Plus, we never recommend savings approaches that could save you money but don’t make sense for your business, contractual and technical realities, and we provide clear instructions for how to implement each change quickly.