DevOps · Guide

Cloud Cost Management

Where the money actually goes, why nobody notices until the invoice, and the levers that move it.

— min read DevOps

An Engineering Metric, Not A Finance Problem

In the cloud, an architectural decision is a recurring purchase. Cost belongs alongside latency and error rate as something engineers see and own — by the time finance raises it, the decision is three months old.

Two properties make cloud spend drift upward on its own. It is invisible by default — nothing in a pull request shows that this change adds £4,000 a month — and it is easy to add and awkward to remove, because nobody is sure what still uses that cluster.

Visibility & Tagging

You cannot manage what you cannot attribute. A bill of one enormous number tells you nothing; a bill split by team, service and environment tells you where to look.

PracticeEffect
Mandatory tags — owner, service, environmentEvery line item has a name attached
Tag policy enforced at creationRetro-tagging thousands of resources never happens
Separate accounts per environmentThe hardest boundary to get wrong
Showback to teamsThe people who can act see the number
Anomaly alertsCatch the runaway job in hours, not on the invoice
Untagged resources are where the waste hides. Enforce tags at creation — through policy or Terraform defaults — because a resource with no owner is one nobody will ever dare delete.

The Levers That Move It

LeverTypical savingRisk
Rightsizing over-provisioned instancesLarge — most are sized by guessLow, if you measure first
Turning off non-production overnightUp to two thirds of dev spendLow
Committed use discounts30–60% on steady baselineLock-in if usage drops
Spot capacity for interruptible workUp to 90%Instances vanish with notice
Storage lifecycle tieringLarge on old dataRetrieval cost and latency
Deleting orphansFree moneyNone, once ownership is clear

Start with waste, not with negotiation. Unattached volumes, idle load balancers, old snapshots, forgotten NAT gateways and a staging cluster nobody has opened since March are pure loss — and removing them requires no trade-off at all.

Egress is the charge that surprises people: moving data out of a cloud, or between regions and zones, costs far more than storing it. A chatty cross-zone architecture can spend more on data transfer than on compute.

Making It Stick

One-off cleanups regress within two quarters. What holds is putting cost where engineers already look.

HabitWhy it works
Cost estimate in infrastructure pull requestsThe decision and its price arrive together
Unit economics — cost per request or per tenantGrowing spend is only a problem if the ratio worsens
A budget per team, with alertsOwnership sits with the people who can act
Autoscaling with sane floorsCapacity follows demand rather than the peak
A regular waste reviewOrphans accumulate continuously
Judge spend as a ratio. A bill that doubles while traffic triples is a success; a flat bill on halved traffic is a problem hiding in a number that did not move.

Interview Questions

Why does cloud spend drift upward?

It is invisible by default — no pull request shows the monthly cost of a change — and resources are easy to create but awkward to delete when nobody is sure what uses them.

What is the first thing to fix?

Attribution. Mandatory tags for owner, service and environment, enforced at creation, so every line item has a name and waste has somewhere to be reported.

Where do the easiest savings come from?

Waste with no trade-off: unattached volumes, idle load balancers, old snapshots, forgotten NAT gateways and non-production environments running overnight.

When are commitments and spot appropriate?

Commitments for a steady baseline you are confident about — they lock you in. Spot for interruptible work like batch and CI, where a few minutes of notice is enough.

Why does egress catch people out?

Moving data out of a cloud or across zones and regions is charged far above storage, so a chatty cross-zone architecture can cost more in transfer than in compute.

What makes cost control durable?

Unit economics and ownership: cost per request or per tenant reviewed like any other metric, budgets per team, and estimates in infrastructure pull requests.

Quick Quiz

1. The prerequisite for managing cloud cost is…
2. Spot capacity suits…
3. The charge that most often surprises teams is…
4. Untagged resources are a problem because…
5. Spend is best judged as…