The cloud bill

Every bill is three meters: time switched on, space used, data sent out

A small web application, one monththe meterCompute2 virtual machines, on all monthby the hour$61Database1 managed database, on all monthby the hour$50Storage100 GB of disk, 500 GB of objectsby the GB kept$20Data out300 GB sent to users, 100 GB freeby the GB sent$18Total for the month$148A cloud bill is the sum of three meters: time switched on, space used, and data sent out.Anything that runs is billed by the hour or second, whether or not it is busy. Anything stored is billed by thegigabyte for as long as it exists. Data leaving the cloud is billed by the gigabyte; data arriving is free. Learn to seethese three in any service’s price and you can predict most bills. Example AWS list prices, 2025.

Cloud charges come from three meters: compute time, storage kept and data transfer out.

The cloud bill · Going deeper

How the price list works, and what is free

Three principles sit behind every price, and each provider gives a free allowance to learn with.

Three pricing principles

Pay as you gono contract; you owe for what you used, by the second or the gigabyte
Commit and savepromise steady use for one or three years and pay much less
Use more, pay lessstorage and data transfer get cheaper per unit at higher volumes

Free tiers

  • Always free, within limits for example, a million function calls a month on AWS Lambda. These allowances do not expire.
  • Free to start Azure gives new accounts $200 of credit for 30 days and popular services free for 12 months; Google Cloud gives $300 of credit for 90 days; AWS gives new accounts starting credits.
  • Free trials short trials of individual services.
The free tier does not cap your spending. Create a budget with an alert at a few dollars on the day you open the account, and check the provider’s current free-tier terms, which change.

Pricing models

One server, three prices: full, committed, or spare capacity

The same virtual machine, three ways to payprice for an hour, as a share of full priceOn-demandno promise; stop at any timefull priceCommittedyou promise steady use for 1 or 3 yearsup to 72% offSpotspare capacity; can be taken back at short noticeup to 90% offThe provider charges less for certainty: promise steady use, or accept that the machine may be taken back.On-demand is the default and the most expensive: you owe nothing beyond the current second. A commitment tradesthat freedom for a large discount on work that runs all the time. Spot sells capacity nobody else is using, at thelowest price, to jobs that can stop and resume. Most bills mix all three. Bars show the largest published discounts.

On-demand is full price with no promise. A commitment saves up to 72%. Spot capacity saves up to 90% but can be reclaimed.

Pricing models · Going deeper · 1 of 2

Covering one day’s demand with all three

One day of demand, covered three ways00:0006:0012:0018:0000:00The steady base, always oncommit for 1 or 3 yearsThe daytime peakon-demand, added and removed by autoscalingA night-time batch jobspot: cheapest, and it can restartCommit to the part of your load that never goes away, and pay full price only for the part that moves.Look at a month of usage: the lowest level it never drops below is safe to commit to. Peaks above it are short,so on-demand is right for them even at full price. Work that can be interrupted, such as rendering, testingand data processing, goes to spot. A commitment is a bill you owe even if you stop using the capacity.

Commit to the steady base, use on-demand for peaks and spot for work that can be interrupted.

Pricing models · Going deeper · 2 of 2

Reserved, Savings Plans, Spot: the names by provider

AWSAzureGoogle CloudNo promiseOn-Demandpay-as-you-goon-demandCommit to a machine typeReserved InstancesReservationsresource-based commitmentCommit to an hourly spendSavings Planssavings plan for computespend-based commitmentSpare capacitySpot InstancesSpot Virtual MachinesSpot VMsWarning before it is taken2 minutes30 seconds30 secondsAlso worth knowingDedicated HostsAzure Hybrid Benefitsustained use discountsEach provider sells the same three deals. The fine print is how flexible the commitment is.Committing to a spend per hour (Savings Plans) is more flexible than reserving one machine type, because it followsyou if you change size or region. Azure Hybrid Benefit lets you reuse Windows Server and SQL Server licences youalready own. Google applies sustained use discounts automatically to some machines that run most of the month.

Reserved Instances and Savings Plans on AWS, Reservations and savings plans on Azure, committed use discounts on Google Cloud.

Idle resources

You pay for what is switched on, so switch off what nobody is using

MonTueWedThuFriSatSunA test server left on all week168 hours a week: $70 a monthThe same server, on only in working hours50 hours a week: $21 a month, 70% lesseach square is one hour; purple is switched on and billedYou pay for what is switched on, not for what is used. The cheapest saving is to switch things off.In a data centre an idle server costs nothing extra, so nobody turns it off. In the cloud every idle hour is billed.Development and test machines are needed about 50 of the 168 hours in a week; a schedule that stops them atnight and at weekends removes 70% of their cost. One m5.large at $0.096 an hour is the example.

Idle resources are billed like busy ones. Scheduling test machines to working hours cuts their cost by about 70%.

Idle resources · Going deeper · 1 of 2

Right-sizing: stop paying for processors that sit idle

This application uses less than one processorcapacity paid for, and the part in use8 processorsm5.2xlarge10% busy$280 a month4 processorsm5.xlarge20% busy$140 a month2 processorsm5.large40% busy$70 a monthRight-sizing: match the machine to what the work actually uses, and the price falls with it.Sizes are chosen by guesswork at the start and rarely revisited. A machine that is 10% busy can usually drop twosizes: the same work, a quarter of the cost. Changing size takes a restart, not a purchase. The providers measureusage and suggest the change: AWS Compute Optimizer, Azure Advisor and Google’s Recommender.

Right-sizing moves a workload to the smallest machine that runs it well. Two sizes down is a quarter of the price.

Idle resources · Going deeper · 2 of 2

Where waste hides

Most wasted money sits in a handful of predictable places. Look for them every month.

  • Disks with no machine deleting a virtual machine often leaves its disk behind, still billed by the gigabyte.
  • Old snapshots and backups kept for ever because nobody set a lifecycle rule.
  • Idle load balancers and public addresses charged by the hour whether or not anything is behind them.
  • Oversized databases the most expensive machines in most accounts, sized for a peak that never came.
  • Forgotten experiments a test in another region that nobody remembers starting.
  • Data in the wrong storage class years of logs kept in the most expensive class.
AWS Trusted Advisor, Azure Advisor and Google’s Recommender list most of these for you, with the saving for each.

Budgets and alerts

A budget warns you during the month, not on the invoice

day 1day 10day 20day 30spend so far this monthbudget $1,000day 20: 80% of the budget is gone. Alert sent.forecast $1,350A budget alert tells you while there is still time to act, instead of at the end of the month.Spending doubled on day 10, when something was left running. Without a budget the first sign would be the invoice.With one, an email arrives at 80% and the forecast shows where the month is heading. A budget warns; it doesnot stop anything unless you connect an action to it. AWS Budgets, Azure Cost Management and Google Cloud Budgets.

A budget sets an expected amount and sends alerts as actual or forecast spending approaches it.

Budgets and alerts · Going deeper

The cost tools, by the question each one answers

The questionAWSAzureGoogle CloudWhat will it cost?Pricing CalculatorPricing CalculatorPricing CalculatorWhere did the money go?Cost ExplorerCost Management: cost analysisBilling reportsAm I about to overspend?AWS BudgetsCost Management: budgetsBudgets and alertsWhat could I cut?Trusted AdvisorAzure AdvisorRecommenderEvery line, for analysisCost and Usage Reportcost exportsbilling export to BigQueryCloud or my own servers?Migration EvaluatorTCO CalculatorMigration CenterSix questions about money, and a tool on each provider that answers each one.Use the pricing calculator before building anything: choose the services and sizes and it gives a monthly estimate.Cost Explorer and its equivalents chart past spending by service, account or tag. Trusted Advisor and Azure Advisoralso check security, reliability and performance, not only cost. These names are asked directly in the fundamentals exams.

Pricing calculators estimate, Cost Explorer and Cost Management analyse, Budgets alert, and Trusted Advisor and Azure Advisor recommend.

Tags

A label on every resource turns one bill into a bill per team

One bill: $8,500. Who spent it?The same bill, grouped by the tag on each resourceteam = shop$4,200 · 49%team = data$2,900 · 34%no tag$1,400 · 16%untagged resources belong to nobody, and nobody trims themA tag is a label on a resource. Tag everything, and one bill becomes a bill for each team and project.A tag is a name and a value, such as team = shop or environment = test, that you attach to anything you create.Cost reports can then be grouped by it. Agree on a few tags, require them when resources are created, and treatuntagged spend as a problem to fix. On Azure, resources do not inherit tags from their resource group by default.

A tag is a name and value attached to a resource. Cost reports grouped by tag show who spent what.

Tags · Going deeper

One bill for many accounts

An organisation can pay for all its accounts on one invoice and share its discounts across them.

Consolidated billing

With AWS Organizations, one management account receives a single bill for every member account, with each account’s costs listed separately. Azure does the same across subscriptions under a billing account, and Google Cloud links projects to a billing account.

Why it saves money

  • Volume discounts add up usage from all accounts is combined, so tiered prices for storage and data transfer are reached sooner.
  • Commitments are shared a Savings Plan or reservation bought in one account can cover matching usage in the others.
  • One place to look budgets, reports and cost allocation tags work across the whole organisation.
Separate accounts per team or project give cost separation even without tags: the account is the label.

Total cost of ownership

Compare everything owning costs, not the price of a server

The costIn your own data centreIn the cloudHardwarebought up front, replaced every 3 to 5 yearsinside the hourly priceBuilding, power, coolingyours, every monthinside the hourly priceSpare capacity for the peakbought, and idle most of the yearnot needed: scale when the peak comesPeopleracking, repairs, patching, night callsfewer: no hardware workSoftware licencesbought separatelyoften included, or bring your ownData sent outusually part of the line rentalcharged by the gigabyteTotal cost of ownership: compare everything owning costs, not the price of the server alone.An hourly cloud price looks high beside the purchase price of a server until the building, electricity, staff andidle spare capacity are counted. The comparison is called TCO. It does not always favour the cloud: a large,steady load can be cheaper to own, as lesson 1 showed. The last row is the cost people forget to include.

Total cost of ownership (TCO) counts hardware, building, power, staff and idle capacity against the cloud’s usage price.

Managing cost

Cost is managed in a loop: see it, cut it, keep watching

1 Seetag everythingshow each team its own costs2 Saveswitch off, right-sizethen commit to what is left3 Keep watchbudgets and alertsa review every monthusage changes every month, so the loop never endsCost is managed in a loop: see who spends what, cut the waste, keep watching.The order matters. You cannot cut what you cannot see, and committing before right-sizing locks in the waste.This practice has a name, FinOps, and its three phases are called Inform, Optimise and Operate. Its central ideais that the engineers who create the costs should see them, because they are the ones who can change them.

FinOps is the practice of managing cloud cost continuously: inform, optimise, operate.

Managing cost · Going deeper

Six ways to cut a bill, easiest first

Work down this list in order. The early items are free and quick; the later ones need more thought.

  • 1 Delete what nobody uses orphaned disks, old snapshots, forgotten experiments.
  • 2 Switch off outside working hours development and test environments, on a schedule.
  • 3 Right-size move machines and databases that sit idle to smaller sizes.
  • 4 Use cheaper storage classes lifecycle rules that move old data to colder classes.
  • 5 Commit Savings Plans or reservations for the steady base that is left.
  • 6 Redesign autoscaling, spot for batch work, serverless for occasional work, a CDN to cut data transfer.
Commit last. A commitment made before steps 1 to 4 pays, for years, for capacity you were about to remove.

Lesson complete

You finished “Cost”

Nicely done.

Open in a new tab