Best practices for saving money on your AWS architecture

Know what you need, regularly analyze what you have

Derek Hutson
7 min readSep 10, 2022

It is not secret that you can both save money and generate substantial income for your business by leveraging cloud computing. If that were not the case, then almost $74 billion in 2021 alone would not have been spent for cloud computing services. So it is clear that many companies both large and small see the value in investing in cloud computing resources.

However as a business you need to be wise with how you spend your money and capital. If you continuously spend more than you make then it is only a matter of time before your business will cease to exist. There are a few recommended strategies you can leverage to provide maximal value to your business, and that will help you balance the opportunity cost of spending money on cloud computing resources vs deploying that money elsewhere. They main takeaway here is that cost optimization is a continual process of refinement and improvement over the span of a workload’s lifecycle. So with that in mind, lets look at some principles that will help you save money and optimize your workloads.

When thinking about how and where to best deploy money into the cloud you should consider the following:

  • Practice cloud financial management
  • Adopt a consumption model with usage awareness
  • Utilize cost effective resources
  • Manage demand and supplying resources
  • Optimize over time

Over anything else, it is important to first understand where your business stands and what sort of demand is being placed on your products and/or services. You need to know when it is time to scale up to meet increased demand (and for how long), and conversely when to scale back down so you can save money on unused resources.

Before investing money, you should invest effort in building out your overall strategy up front. This will allow you to consistently adhere to best practices and avoid unnecessary over provisioning. Only once you have a high-level framework for how you plan on deploying money into the cloud should you get more granular. So assuming you have your framework in place, lets talk in a little more detail about these practices to help optimize your costs in the cloud.

  1. Practice cloud financial management

The backbone of this involves creating a culture that is mindful of cost awareness. This could involve an individual within each team, or maybe in larger organizations you have a team dedicated to cost management and analysis. This culture involves using data and metrics to actively track costs so you know who is doing what and when, and creating a partnership between your financial and technology teams.

You should be actively keeping cloud budgets and forecasts so that there are no surprises when your billing statements come due. You must also have cost-aware processes that you can reuse and modify, much in the same way you would want to have reusable containers for your applications to make scaling and management substantially easier.

Finally, as I mentioned earlier you want to establish a culture of cost awareness where your teams are regularly reporting on cost usage. There are tools such as Amazon Quicksight, AWS Budgets, and AWS cost explorer dashboards that make tracking and reporting on spending much easier and more convenient.

2. Adopt a consumption model with usage awareness

In an efficient organization you likely will have multiple departments that utilize their own set of resources, that bring in their own streams of revenue. Having said that you want to properly govern your organization with clear usage policies. These policies should be simple so that they are easy to both understand and implement. For example you want to specify what types of compute resources are to be used in a dev/test environment vs a production environment. You likely want to use a cheaper scaled back version of your resources for the dev/test environments.

You will want to set measurable targets so that over time you can refine where resources need to be scaled up or back. If you have an underperforming department with over provisioned resources then it does not make sense to continue with that same level of resources, but this is impossible to know if you do not have measurable targets in the first place.

From an executive and managerial point of view, you want to structure your account in a one parent to many child structure (the parent AKA payer, child accounts being various departmental spending accounts) with your resources being in the child accounts. You can use AWS Organizations to accomplish this, and opt into consolidated billing to allow a global view of what accounts your costs are actually coming from.

Finally, be sure to setup automated notifications using a service like SNS or CloudWatch that will allow you to be notified when certain criteria are met. This allows you to act quickly and verify if corrective action is needed without impacting existing resources. It will also allow you to see if certain accounts are over provisioning, however this can be prevented in the first place by implementing proper IAM policies.

By utilizing notifications you have the ability to easily and automatically decommission resources that are not being fully leveraged over a given period of time, or even add more resources if a certain department requires them to meet demand and sustain or increase revenue.

3. Utilize cost effective resources

The key concept here is to know what type of resources and configurations you need to meet your workloads. It makes zero sense to provision a large amount of resources and only fully utilize a small fraction of them. This is what I like to call wasting money.

This practice ties back into the high level plan you have for your organization. You need to find the right balance between the cost of analysis and the potential savings on a workload over its lifecycle. You should also be considering other areas of your architecture such as reliability. What sort of back ups do you need in case of emergency? For example having a fully scaled copy of your production resources as a backup is much more expensive than taking a pilot light approach, where you have an extremely scaled down version of your business critical systems always running that you can then scale up if needed.

You want to also consider which pricing model is appropriate for your workloads. For example if you have some compute workloads that are not business critical and can tolerate some interruptions (such as batch processing or analytics), you could consider using spot instances as opposed to on demand or reserved ones. By using spot instances you can potentially save up to 90% on your compute resources. On the other hand if you know you need a certain amount of compute capacity, you can consider purchasing reserved instances with an all upfront payment over the course of a year for example, to apply the largest possible discount to resources you know you will need anyways.

4. Manage demand and supplying resources

This refers to provisioning just enough resources that are needed to meet workload demand when it occurs. For example if most of your business traffic occurs during business hours of 9–5, you can set an auto scaling group that adds more servers before 9, and after 5 it automatically decommissions some of your resources to save you money during off hours when usage is not as high. If you want to get a better idea of your usage and demand windows you can use a service like Amazon Quicksight to get a better idea.

Pretty straightforward here, but the key idea here is to know when your business has increased and decreased demand, and automate your architecture to scale up or down so you save yourself manual work and reduce human error from forgetting to do one or the other. This will also save you operational costs from having workers or employees manually managing your server and resource clusters, so the savings will be multi faceted.

5. Optimize over time

Last but certainly not least, as an efficient business utilizing a well-architected framework, you need to be continually analyzing your architecture over time and making the appropriate changes based on demand and provided value.

The best way to do this is to develop a workload review process, and subsequently review and implement changes to your services. I previously discussed a few different services that provide you with reporting tools on your resource and service usage that you can leverage in your reviews to know what is and is not being leveraged properly.

This should be an all encompassing, forward looking process as well that weighs the costs of both removing legacy architecture and implementing new technologies. For example the cost of moving to a new programming language or application stack may not be worth it currently, but in 5 years time if you are predicting a shift in the market you serve it may be worth it then. Review processes should consider both past and future events.

The goal of this article is to give you a brief overview of how you can optimize your costs in the cloud while still delivering maximal value in your business. It is important to find the right balance between leveraging automation to refine your current resources and services, and utilizing manual effort from your teams and employees to deploy new resources and technologies.

For more information do check out the AWS white paper on cost optimization. I hope this was helpful and as always best of luck on your continued journey through cloud computing.

--

--

Derek Hutson
Derek Hutson

Written by Derek Hutson

Practicing Kaizen in all things. Being a dad is pretty neat too.