Skip to content
Tech notes

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.

Date posted

20 April 2020

Share

4 min read

Tags:
Loft - Related posts

More in tech notes

Loft - Post grid item

How much does security cost?

Simple question, difficult answer. Security could cost nothing, but end up costing you everything. COVID-19 has changed the IT landscape. Suddenly, security audits focused on offices and infrastructure are barely valid anymore. A large part…

Read more

Loft - Post grid item

7 reasons you should modernise your legacy systems

Application modernisation Let’s admit it. Every company has a skeleton in the closet - where one of the biggest skeletons is often a legacy system.What is a legacy system? Wikipedia defines a legacy system as: an…

Read more

Loft - Post grid item

New Relic as an aid to massive scalability

We have a number of large scale projects on at Loft at present, and with this in mind massive scalability is one of our primary areas of new research and development. We are looking at…

Read more

Loft - Post grid item

Researching Darwinian Artificial Intelligence

Loft engineer Jan Svoboda is studying Grammatical Evolution - a technique that mimics biological evolution as described by Darwin, to create new software. It's able to generate computer code based on user-defined cost functions, such as unit…

Read more

Take the next step with Loft

Learn how Loft can help solve your most challenging technology objectives.

Talk to an expert