Seven ways to optimise your AWS spend

In these challenging times, every business should be looking at their infrastructure spend to ensure every aspect is fully optimised to deliver maximum returns.

This article by Loft Head of Engineering, Zdenek Machek, provides a checklist of actions that should be considered.


A recent blog post by Amazon, 10 things you can do today to reduce AWS costs, provides some inspiration on how to reduce the cost of cloud computing services. For example AWS is great for spinning new things, but it is trickier to ensure that you utilise all committed resources and you don’t have more than you need.

Here are some Loft tricks on how to reduce cost, some of which apply not only to AWS, but also to Azure, Google Cloud, or any other cloud hosting provider.

1. Don’t run what you don’t need

It is really as simple as it sounds. Review all instances, containers and services, and shutdown or terminate what is not being used.

Consider if you need to run development/qa/testing infrastructure 24/7. Probably not – in most cases just office hours would be enough. Schedule starts and stops of those instances.

Use lambda functions or schedule events using AWS CLI or AWS SDK.

2. Optimise

There is a saying that developers’ time is more expensive than cloud resources. But what if a couple of days of code optimisation and bottleneck identification can save tens or hundreds of thousands in running costs for application that runs for years and years? In this case the developer’s time is not a cost but an investment that reduces costs.

Badly written code is resource intensive. Analysing and optimising code can save a small fortune.

Databases are expensive and scaling is difficult: even a simple extra index can do real magic.

3. Use caching

Caching is a very effective way not only to speed up an application, but also to reduce processing power and save cost.

You can use simple tricks like client side caching for web applications, CloudFront or other CDN caching options, or tools like Varnish. These can be real game changers. For example, for sites serving static CMS content, caching can reduce the need for servers by 90%.

4. Serveless is cheaper than running servers

If you run instances or containers for production systems, probably you run them 24/7. You can setup autoscaling groups and adjust the number of instances.

But what if real compute power is needed just from time to time? Consider, for example, a site that is mostly static, but has a feature that allows a user to register for updates.

“Lambda functions are a way to run code without worrying about infrastructure and without having to pay for CPU time if you don’t need it.”

5. Use Savings Plans

Saving Plans are a new feature introduced in November 2019. Before Saving plans were introduced, reserved instances were the way to save cost, but it wasn’t easy to get it right. A Savings Plan is not limited to exact instances. Instead you just specify your spending commitment.

This applies not only to EC2 instances but also Fargate, covering Docker containers running on infrastructure managed by AWS. This can save you up to 72% on AWS compute usage.

6. Use different S3 Storage Classes

S3 buckets are one of the core AWS services. You can store all sorts of data, including things like backups and archives.

You can save cost by using the correct storage class. Look at setting up lifecycle policies to move data after a defined period to a storage class designed for less frequent access, with reduced cloud storage costs.

If you are not sure, go for Intelligent Tiering: AWS will move data automatically without performance impact or operational overhead.

In difficult times every little counts. Hopefully these tricks can help your business continue to perform at best while potentially making very large savings in your cloud overheads.

“Managed service could be five times more expensive than running the service on your own instance.”

7. Weigh the pros and cons of using managed services

Services like AWS RDS, DocumentDB and Elasticache are very easy to set up and use, but they come with a price tag. For example, storing business-critical data for disaster recovery and business continuity is a good use case for RDS. But for non-critical services and data like caches and logs, it’s good to compare how much a managed service costs versus how much, say, an EC2 instance would cost. You may discover that a managed service could be 5 times more expensive than running the service on your own instance.

If your company needs help planning, setting up or optimising your AWS services, we’d like to talk. Please get in touch with us here.

Latest News & Insights

Say connected – get Loft updates straight to your inbox.