A cloud bill usually grows for ordinary reasons. Resources are created and never turned off, machines and databases are sized larger than the work needs, storage and backups pile up with no rule for deleting them, and nobody is responsible for looking. To get it under control, make the bill readable, remove what nobody uses, size what is left to the work it does, and only then commit to discounts. Then give the bill an owner, so that it stays under control.
Why the bill grows
In a data center, spending is fixed when the purchase order is approved. In the cloud, anyone with access can start something that is billed by the hour until someone stops it. The common causes follow from that.
- Things that were never turned off. A test environment, a proof of concept, or the old servers that were going to be kept for a week after a migration are still running.
- Things that are stopped and still billed. A stopped virtual machine can still cost money. Microsoft’s documentation says that an Azure VM that is stopped but still allocated is billed, and that a deallocated VM is not billed for compute, while resources such as its disks continue to incur charges.
- Sizes chosen once and never revisited. A server moved from a data center is often given the size it had on hardware that was bought to last for years.
- Storage that only accumulates. Snapshots, backups, logs and old file versions grow every day unless a retention rule removes them.
- Test environments that run all the time. Development and test systems are used during working hours and billed around the clock.
- Real growth. More customers, more data and more transactions cost more. That part of the increase is healthy, and you should be able to say how much of the total it is.
Make the bill readable first
Cutting comes second, because you cannot safely remove something when you do not know what it belongs to. Before you change anything, get to the point where every large line on the bill has an application and a person beside it.
Azure and AWS both include the tools for this. Microsoft Cost Management reports on and analyzes Azure costs. AWS Cost Explorer shows costs and usage for up to the last 13 months. Group the spending by service, then by subscription or account, then by tag, and look at what grew.
Tags connect a resource to an application, an environment and an owner. Two details catch people out. On AWS, a tag has to be activated as a cost allocation tag before it appears in Cost Explorer. On either cloud, tags help only when they are on everything, so choose a few required ones, such as application, environment and owner, and make them a condition of creating a resource.
Ask around about anything that has no tag. If nobody claims it, it is a candidate for the next step.
Remove what nobody uses
This is usually the fastest saving and the lowest risk, provided you do it in a careful order. Look for disks attached to nothing, snapshots older than your retention period, public IP addresses and load balancers with nothing behind them, databases with no connections, and whole environments left over from finished projects.
For each one, take a final snapshot or export if there is any doubt. Stop it, wait a full business cycle that includes a month-end, and then delete it. Stopping first means that if something depended on it, you find out while you can still turn it back on.
Size what is left to the work it does
Look at how busy each machine and database is over several weeks. One afternoon tells you little.
The clouds suggest candidates. Cost Management brings in Azure Advisor’s cost recommendations, and AWS Compute Optimizer, once you opt in, gives rightsizing recommendations and finds idle resources. Compute Optimizer looks at the last 14 days of utilization by default, so check any recommendation against your busiest period, such as month-end, before you act on it.
- Resize in steps. Go one size down, watch for a few weeks, and go down again if the system is still comfortable.
- Put test environments on a schedule. Shut down development and test systems outside working hours.
- Set retention rules. Decide how long snapshots, backups and logs are kept, and confirm the period with whoever is responsible for records before you shorten it.
Commit to discounts last
Both clouds sell lower rates in exchange for a commitment. AWS Savings Plans give savings beyond on-demand rates in return for committing to a set amount of compute use for one or three years. Azure offers reservations and savings plans, which also trade a commitment for a lower rate. If you already own Windows Server or SQL Server licenses, Azure Hybrid Benefit lets you use eligible ones on Azure.
Do this after the cleanup. A commitment lowers the rate on what you run today, so if you make it before cleaning up, you have committed to paying for the waste. Commit to the steady base that remains after the earlier steps, and leave the part that varies on pay-as-you-go rates.
Keep it from growing back
- Set a budget with an alert. AWS Budgets can notify you when costs exceed, or are forecast to exceed, the amount you set. Cost Management has budget alerts that do the same for Azure.
- Turn on anomaly alerts. A sudden jump should be reported within days, before it reaches the invoice. Azure has anomaly alerts in Cost Management, and AWS has Cost Anomaly Detection.
- Review the bill every month with the list of owners. The meeting is short once the bill is readable.
- Require the tags. Nothing new is created without them.
When the cause is the design
Some costs will not come down with cleanup, because they come from how an application was built. Examples are a database that runs all day to serve a job that takes an hour, an application that moves large amounts of data between regions, and a system that was moved to the cloud unchanged and still behaves like a fixed server.
Lowering these costs is engineering work on the application. Put each one on the list of projects with an estimate of what the change would cost and what it would save each month, so that the business can decide.
Common questions
Should we buy reservations or a savings plan to bring the bill down quickly? Not first. A commitment lowers the rate on what you run today, including what you do not need. Remove and resize first, then commit to what is left and steady.
Do we need a third-party cost tool? Usually not to start. The cost tools included with Azure and AWS show spending by service, by account and by tag, and they send budget alerts. Most of the early work is ownership and cleanup, which no tool does for you.
Who should own the cloud bill, IT or finance? IT owns the explanation and the changes, and finance owns the budget. Each application on the bill should also have an owner in the business who can say whether it is still needed.
Would moving back to our own servers be cheaper? Sometimes, for steady workloads that never change size. Compare the full cost on both sides, including hardware, licenses, power, backup and the people who run it, and clean up the cloud environment before you compare.
If nobody can explain the largest lines on the bill, a System Evaluation is an independent look at the environment and the applications that run in it, with written findings and a prioritized plan for a fixed fee.