Five key best practices for AWS cost optimisation – analysed
Cloud computing news, opinion and best practice around security, software, infrastructure, platform, enterprise strategy, development tools, and much more. Follow us on Twitter @cloud_comp_news.

Keeping cloud costs in check is a struggle. Companies either lose control of their budgets and spend even 23% more than planned or end up overprovisioning their workloads. 

Optimising cloud costs is about striking a healthy balance between price and performance. You want your applications to have enough resources, but at the same time avoid cloud waste. 

Here are five tips to get you started on your AWS cost optimisation journey.

#1: Allocate costs for multiple teams using tags

Several teams or departments might be contributing to your AWS cloud bill, so you need a way to make this visible (and predictable). 

AWS offers two handy tools for categorising expenses by accounts, organisations, or projects:

  • Organisations – for centrally managing and governing the environment while scaling AWS resources. Includes budgets and policies applied to accounts or groups. 
  • Tagging resources – use resource tags in the AWS Cost Explorer and create tags for each team, environment, application, service, and feature. Turn on cost grouping for those tags, and you’ll get the reports you need in the AWS billing console.

#2: Choose the right instance type

AWS offers 150+ EC2 instance types with entirely different combinations of CPU, memory, storage, and networking capacity. Each comes in one or more sizes, so you can scale easily.

You might be tempted by an affordable instance – but what happens when you start running a CPU-intensive application on it and experience performance issues? This might affect your reputation.

  • Start by defining your application’s requirements in terms of CPU, memory, storage, and network.
  • Pay attention when choosing between CPU- and GPU-dense instances (GPU is a better match for machine learning, for example).
  • Verify your instance’s capabilities by benchmarking: drop the same workload on each machine type and check its performance. 
  • Double-check storage transfer limitations and make sure that the VM you select has the storage throughput your application needs. 

Tip: Take advantage of spot instances for 90% savings: In spot instances, you bid on resources AWS isn’t using now and save up to 90% off the on-demand pricing. 

Many companies miss out on spot instances because they’re not sure how to handle interruptions. 

That’s why your first step is to check if your workload is spot-ready:

  • Is your workload mission- and time-critical?
  • How much time does it need to finish the job? 
  • Can it handle interruptions? 
  • Is it tightly coupled between instance nodes? 
  • How will you move it to another instance when AWS pulls the plug? 

To increase your chances, set up groups of spot instances (AWS Spot Fleets) and request multiple instance types simultaneously.

When selecting a spot instance, pick one that’s slightly less popular – it’s less likely to get interrupted. You can check its frequency of interruption in the AWS Spot Instance Advisor. 

#4: Use autoscaling

Workloads tend to vary a lot, and sudden surges of traffic might affect their performance if you’re not prepared to handle a bigger load automatically. 

If your application receives unexpected traffic, you might deliver a poor experience if you rely on manual scaling. And when adding resources, you risk overspending when the traffic goes down.

Scaling your cloud resources manually doesn’t make sense. 

Use tools like Amazon EC2 Auto Scaling and AWS Auto Scaling to monitor your applications and automatically adjust capacity for a steady and predictable performance at the lowest possible cost. 

#5: Avoid buying capacity upfront

In Reserved instances, you buy capacity upfront in a specific Availability Zone for a much lower price when compared to on-demand. You commit to a particular instance or family – you can’t change this later on. And what if your requirements change in the meantime?

AWS also offers Savings Plans where you commit to using a specific amount of compute power over some time.

In both cases, you risk locking yourself in with the cloud vendor and committing to pay for resources that might not make any sense for you in 1 or 3 years. 

These options remove any flexibility of scaling or ability to configure multi-region/zone distribution easily. As a result, you’ll be missing out on more cost-effective options.

Optimise your AWS bill intelligently 

To reduce your AWS bill, you need a platform that automatically chooses the right instance size, uses spot instances, takes care of autoscaling, and helps you to manage infrastructure dependencies.  

CAST AI does just that for Kubernetes workloads. So if you use EKS, you can analyse your clusters for free, identify money leaks in minutes, set cost policies, and let AI keep optimising your cloud bill.

Editor’s note: This article is in association with CAST AI.

Similar Posts