The cloud bill
Every bill is three meters: time switched on, space used, data sent out
Cloud charges come from three meters: compute time, storage kept and data transfer out.
Cloud pricing looks bewildering: hundreds of services, each with its own price list. Underneath, there are only three meters. Here is one month for a small web application. Two virtual machines, billed for every hour they were switched on, busy or not. Sixty-one dollars. A managed database, the same way. Fifty. Storage, billed by the gigabyte for as long as the data exists. Twenty. And data sent out to users, billed by the gigabyte. Eighteen. Time, space, and data leaving. Nearly every line on any cloud bill is one of those three.
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 principles sit behind every price, and each provider gives a free allowance to learn with. Three pricing principles. 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.
Three pricing principles
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.
Pricing models
One server, three prices: full, committed, or spare capacity
On-demand is full price with no promise. A commitment saves up to 72%. Spot capacity saves up to 90% but can be reclaimed.
The price of a machine depends on what you are willing to promise. On-demand is the price on the list. You promise nothing and can stop at any second. It is the most flexible, and the dearest. Promise to keep using that capacity for one or three years, and the provider cuts the price, by as much as seventy-two percent. They can plan around you, and they pay you for it. Spot is capacity the provider has standing idle. It is sold for up to ninety percent off, with one condition: when someone else needs it, yours is taken back with a couple of minutes’ warning.
Pricing models · Going deeper · 1 of 2
Covering one day’s demand with all three
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
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
Idle resources are billed like busy ones. Scheduling test machines to working hours cuts their cost by about 70%.
The biggest saving needs no discount at all. This is a test server and the hundred and sixty-eight hours in a week. It was started once and never stopped, so every square is billed: seventy dollars a month. But people only use it during the working day. Run it Monday to Friday, eight till six, and it is on for fifty hours. The same server now costs twenty-one dollars. Seventy percent less, and nobody notices the difference. A schedule that stops machines at night is a few minutes’ work.
Idle resources · Going deeper · 1 of 2
Right-sizing: stop paying for processors that sit idle
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.
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.
- 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.
Budgets and alerts
A budget warns you during the month, not on the invoice
A budget sets an expected amount and sends alerts as actual or forecast spending approaches it.
Because spending follows usage, a mistake can run up a bill quietly. A budget is how you find out in time. This line is the money spent so far this month. On day ten it turns upward: something was left running. The dashed line is the budget, a thousand dollars. On day twenty, spending reaches eighty percent of it, and an alert goes out by email. The forecast shows the month ending at thirteen hundred and fifty. There are ten days left to find the cause. Without the budget, the invoice would have been the first warning.
Budgets and alerts · Going deeper
The cost tools, by the question each one answers
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
A tag is a name and value attached to a resource. Cost reports grouped by tag show who spent what.
A bill that only gives a total is hard to act on. Eighty-five hundred dollars this month. Who spent it? The bill alone cannot say. Now give every resource a label when it is created: which team owns it. Group the same bill by that label and the answer appears. The shop team spent forty-two hundred, the data team twenty-nine hundred. Each can now look at its own costs. And fourteen hundred belongs to resources with no label at all. Nobody owns those, so nobody is trimming them. They are the first place to look.
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.
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.
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.
Total cost of ownership
Compare everything owning costs, not the price of a server
Total cost of ownership (TCO) counts hardware, building, power, staff and idle capacity against the cloud’s usage price.
Is the cloud cheaper than owning? Only a full comparison can say, and most comparisons leave things out. Go down the list. Hardware: bought up front and replaced every few years, or folded into an hourly price. The building, the power and the cooling: the same. Spare capacity for the busiest day: bought and idle, or simply not needed. People: fewer, because nobody repairs hardware. Licences: often included. And one row that runs the other way. Data sent out is charged by the gigabyte in the cloud, and people forget to count it.
Managing cost
Cost is managed in a loop: see it, cut it, keep watching
FinOps is the practice of managing cloud cost continuously: inform, optimise, operate.
None of this is done once. Usage changes every month, so cost is managed as a loop. First, see. Tag everything and show each team what it spends. Second, save. Switch off what is idle, right-size what is too big, and only then commit to what remains. Third, keep watch. Budgets, alerts, and a short review each month. Then round again. The teams that do this well have one thing in common: the engineers who create the costs can see them.
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.
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.
- 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.
Lesson complete
You finished “Cost”
Nicely done.