May 4, 2023

Controlling Cloud Costs

Chris Belyea

Everything in technology—and the economy—goes in a cycle. The arcs are long, and when things come back around, they don’t exactly resemble the last iteration, but what is “new” is often a variation on a theme we’ve seen before.

“The Cloud” used to be whiteboard shorthand for someone else’s network. That notation has come to represent a paradigm shift in computing, but as companies migrate to and then operate in the cloud, they come to realize that while they don’t own the infrastructure anymore, operating in the cloud still demands a sophisticated level of governance and technical capability. There’s no free lunch. Just look at many organizations’ cloud bills.

Here are some things to consider if you’re thinking about how to manage cloud costs for your organization.

  1. Review how you’re using the cloud and if your applications are properly architected. Did you ever revisit those “lift-and-shift” apps that you migrated? Do you need to architect for portability across clouds and data centers?
  1. Get a detailed understanding of your current costs. Which systems are the biggest cost drivers? This is where you should focus your cost-reduction efforts.
  1. Automation and platforms are as important as ever—regardless of where your workloads run.

⚠️ You don’t migrate to the cloud to save money! If you did, then you migrated to the cloud for the wrong reasons.  

While some companies migrate to the cloud hoping to avoid the expense of impending data center hardware refreshes, most are adopting cloud services to help their organizations innovate and deliver faster than they could in their on-premises environments. The on-premises friction typically consists of technical, bureaucratic, and logistical factors, and moving to the cloud provides a way to overcome some of those. Of course, not having a solid cloud strategy or adequate governance in place will lead to other issues such as excessive cloud costs. Well-governed cloud environments can produce cost savings, but the savings are neither immediate (you’ll still have on-premises systems during a migration) nor automatic.

In a rocky economy with rising interest rates, companies are looking at ways to reduce costs, and cloud computing expenditures are usually a material line item.

Let's do a deep dive on some ways you can manage your cloud costs.

Architecture + Usage = Cloud Costs

First, examine how you’re using cloud services. Are you using the cloud to predominantly run fleets of VMs just like you did in your data centers? If so, this is likely one of the biggest drivers of your cloud costs. Treating the cloud like a typical hosting provider is a cardinal cloud sin. In the cloud, architecture plus usage equals your costs. If your applications are not architected for the cloud, then your costs will automatically be higher. Architecting for the cloud is a spectrum, with the greatest cost advantages typically coming with greater use of cloud native—and vendor proprietary—services. This is where your cloud strategy comes in, determining what level of vendor lock-in the organization is comfortable with and setting that standard to help architects and product teams decide when to make use of cloud native services, and which ones to avoid or adopt. Our SingleStone Cloud Migration approach emphasizes this as a key decision to be made as part of a migration.

Vendor lock-in isn’t necessarily bad, either. It should be a calculated trade-off. More lock-in also comes with less undifferentiated work and more bandwidth for your product team(s) to deliver business value faster and with less effort. Employed properly, this velocity is a competitive advantage for your business.

There are also some approaches to avoiding vendor lock-in. Following the principles of The Twelve-Factor App is a good starting point for assessing your lifted-and-shifted apps. Dapr is a CNCF project that provides standard interfaces for common application building blocks that are often provided by cloud-specific services. This abstraction provides an increased level of portability across clouds without requiring extensive re-architecture. And containerization continues to be one of the best ways to maximize portability and improve developer workflows.

Many companies are pursuing or considering a multi-cloud strategy. This is typically done to reduce reliance on a single provider, but companies may also view this as an arbitrage opportunity to get the best prices for their workloads. This strategy provides distinct advantages, especially if choosing providers based on specific capabilities they provide (do you want access to ChatGPT and other LLMs? Maybe Azure’s OpenAI is for you). But before taking this path, ensure that you are managing your workloads in a single cloud provider well. Each public cloud brings significant complexity—multiplying that by two or three is not something to be done lightly and may well increase costs due to the increased operational overhead, staff, and compliance needs.

AWS, Azure, and Google Cloud all have solutions for running hybrid workloads (Outposts, Stack and Arc, and Anthos, respectively) which provides a common control plane with the ability to run workloads where you want. The capabilities and pricing vary, and these approaches lock you in more with a cloud provider, but if the efficiency gains of managing your infrastructure and platforms in a unified way are compelling, they may be worth consideration. Just check the price tag!

Kubernetes is often looked to as the panacea for bridging differences between cloud providers, on-premises environments, and everything in between. It provides a common language and API that can form the basis of a broad developer platform. But it also introduces significant complexity and cannot fully mask the differences between providers. Strongly consider Kubernetes but ignore the hype and make it an informed decision.

Don’t forget about reserved instances

Reserved instances and reservations are key tools for controlling cloud costs. By committing to certain base usage levels for longer-terms you can get steep discounts on some cloud resources. Using this effectively requires planning and an understanding of your capacity needs, including earmarking capacity for disaster recovery (DR) and high-availability (HA) requirements. If you’re running an active-active architecture, then each site needs to be sized to handle the full load of both sites to accommodate a failure.

In addition to reserved instances, spot capacity is another option for reducing costs for workloads that can tolerate unpredictability and interruptions. This can be trickier to make effective use of, and you typically need to design your application to take advantage of this usage model. But if you have the right use case, it can be a great way to reduce costs.

Negotiate!

And finally, try negotiating pricing with your provider. In this economic environment, the cloud providers want to retain their customers for the long term and may be willing to provide some pricing flexibility.

Approaches for understanding cloud costs

Before you start changing things, you need to understand your cost drivers. And to understand the cost to operate each of your cloud-based systems, you need to have a way to clearly track them. There are a few ways to start understanding how cloud costs relate to applications and teams, but these are the most important:

  • Use standardized tagging on all your cloud resources to correlate costs.
  • Use discrete accounts or subscriptions with consolidated billing. Tagging is important, but this is the best way to set definitive cost boundaries between bounded contexts and enable effective cost reporting.
  • Each cloud provider has tools to examine costs—use them. The data in those tools is significantly more useful once you have account/subscription boundaries and standardized tags in place. And while the tools are helpful, you may find you need to export that data for further analysis.

These can all help with allocating costs to specific applications or teams. Even with those tools this is a challenging task, and you may decide you need outside expert help to get a handle on your cloud spending.

Automate

In the cloud, you only pay for what you use. So, if you’re looking to control costs, make sure you only use what you need. Since resources are available on demand, only provision what you need, and when you’re finished with that resource, delete it so that you don’t keep paying for it. This is only feasible with automation. Two common areas of excessive costs are long-lived, non-production environments and development resources running overnight. You can enable teams to proactively manage their spending by making cost data easily available to them and providing recommendations and self-service automation tools they can use to easily terminate unused resources.  

You migrated to the cloud to innovate and deliver faster

However, our current economic state is causing many of us to take a hard look at expenditures and determine where we can save. There are real savings that can be found in a well-managed, well-governed cloud environment. We have many examples of how we’ve helped our clients control cloud costs (my teammate Luke helped our client save $8,000 every month, for example).  

Are you looking to get your cloud spending under control? SingleStone can help with a cost optimization review. Tap into our years of cloud expertise to help you understand what’s ratcheting up your bills—and how to lower them.

Contributors

Chris Belyea

Director & Principal Architect of Cloud
Alumni
View profile