Every deploy is a purchase
When a company owned its servers, spending was decided a few times a year, by people who signed purchase orders. In the cloud it is decided all day long, by engineers: a larger instance type here, a debug log level left on there, a test cluster nobody deletes, a service that calls another in a different zone a million times an hour. Each choice is small; together they are the bill, and it arrives after the money is spent.
That is the problem this lesson is about. The first lesson asked whether to rent at all; here the question is how to rent well. We will read a bill line by line, compute how much capacity to commit to and when to use spot capacity, price an architecture's data transfer, allocate shared costs to teams and turn them into unit costs, and look at the practices — called FinOps — with which organisations keep all of this under control. We end with the cost the invoice does not show: energy and emissions.
FinOps is not cost-cutting for its own sake. The cheapest system is one that does nothing; the goal is spending that buys as much value as possible, decided by the people who understand both the engineering and the business. Every price in this lesson is a made-up round example, dated 2026; the providers' own pricing pages (AWS, Azure, Google Cloud, Alibaba Cloud) are the only source for real ones, and they change.
How a cloud bill is built
Definition— Line item
One row of a bill: a meter (what was measured — instance-hours of one machine type in one region, gigabyte-months of one storage class, gigabytes sent to the internet, millions of requests), the quantity used in the period, the unit price, and the resulting cost, together with the resource, account and tags it belongs to.
A month's bill can have millions of line items, but they fall into a few families. Compute is billed per second or per hour of a machine, or per request and GB-second for functions. Storage is billed per gigabyte-month, by class (frequently accessed, infrequent, archive), plus per thousand requests and, for archive classes, per gigabyte retrieved. Data transfer is billed per gigabyte leaving the provider's network, crossing regions and sometimes crossing zones, plus per gigabyte processed by gateways and load balancers. Managed services add their own meters — per query, per gigabyte scanned, per million messages — and support plans and marketplace software appear as further lines.
The price on each line depends on how the capacity was bought:
- On demand: no commitment, the highest unit price.
- Commitments: a promise to pay for a fixed amount of usage, or a fixed hourly spend, for one or three years, in exchange for a lower price. Each provider has its own forms — AWS Savings Plans and Reserved Instances, Azure reservations and savings plans, Google Cloud committed use discounts, Alibaba Cloud subscriptions and savings plans — some tied to one machine family in one region, some flexible across them.
- Spot (or preemptible) capacity: spare machines at a deep discount, which the provider may reclaim at short notice — AWS, Azure, Google Cloud, Alibaba Cloud.
- Automatic discounts and credits, such as Google Cloud's sustained-use discounts for some machine types, free tiers, and negotiated enterprise discounts.
Two numbers per line therefore matter: the list cost at on-demand prices and the effective cost after discounts and commitments are applied. Bills from different providers used to be impossible to compare column by column. The FinOps Foundation's FOCUS specification defines common columns for both, and for the service, region, resource, tags and charge category; as of 2026, AWS, Microsoft Azure, Google Cloud, Oracle and Alibaba Cloud (in preview) among others offer billing exports in FOCUS format.
The lines that surprise teams are rarely the instances. The serverless lesson listed several: API gateways that charge per request, logs billed per gigabyte ingested and stored, NAT gateways billed per gigabyte processed, and data transfer. To them add disks and snapshots that outlive their machines, idle load balancers and reserved IP addresses, cross-zone traffic between chatty services, and the observability bill from Observability and autoscaling.
Commitments and spot capacity
The first lesson proved when to own the -th server rather than rent it: when it would be needed in at least a fraction of the hours. A commitment is the same decision with the provider in place of your own data centre. If committed capacity costs a fraction of the on-demand price, paid for every hour whether used or not, the rule becomes:
Theorem— Break-even rule for commitments
Commit to the -th instance exactly when it would be needed in at least a fraction of the hours. Equivalently, the cost-minimising commitment is the -quantile of hourly demand: the level that demand reaches or exceeds in a fraction of hours.
Proof
Apply the ownership theorem with the cost of committing one instance for the period, , in place of the cost of owning it: the threshold is .
∎
So a commitment at 62% of the on-demand price (a 38% discount) pays for an instance needed in at least 62% of hours; at 42% (a 58% discount, as for a longer term in this example) the commitment should be deeper. The figure shows a week of a web fleet's demand with both levels; the program computes them for a whole month and compares them with the levels people often choose by instinct.
import math
import random
rng = random.Random(3)
HOURS = 730 # an average month
# Instances the web fleet needs each hour: a base, a daily swing, quieter weekends, some noise.
demand = []
for h in range(HOURS):
hour, day = h % 24, h // 24
daily = 0.5 - 0.5 * math.cos(2 * math.pi * (hour - 4) / 24) # lowest at 04:00
weekend = 0.8 if day % 7 in (5, 6) else 1.0
demand.append(round((40 + 70 * daily) * weekend + rng.gauss(0, 3)))
PRICE = 0.20 # on-demand USD per instance-hour; every price here is an illustrative example
TERMS = {"1-year commitment": 0.62, "3-year commitment": 0.42} # fraction of on-demand paid
def monthly_cost(k, c):
"""Commit to k instances at fraction c of on-demand (paid whether used or not); the rest on demand."""
return k * HOURS * PRICE * c + sum(max(0, d - k) for d in demand) * PRICE
def best_k(c):
"""The break-even rule: commit to the k-th instance if it is needed in at least a fraction c of hours."""
return max(k for k in range(max(demand) + 1) if sum(d >= k for d in demand) >= c * HOURS)
on_demand = monthly_cost(0, 1)
print(f"web fleet: {min(demand)} to {max(demand)} instances, mean {sum(demand) / HOURS:.1f}")
print(f"all on demand: USD {on_demand:,.0f} a month\n")
print(f"{'term':18s} {'commit to':>14s} {'instances':>9s} {'USD/month':>10s} {'saving':>7s}")
for term, c in TERMS.items():
rule = best_k(c)
brute = min(range(max(demand) + 1), key=lambda k: monthly_cost(k, c))
assert monthly_cost(rule, c) == monthly_cost(brute, c) # the rule finds the optimum
for label, k in (("the minimum", min(demand)), ("the rule", rule), ("the mean", round(sum(demand) / HOURS)), ("the peak", max(demand))):
cost = monthly_cost(k, c)
print(f"{term:18s} {label:>14s} {k:9d} {cost:10,.0f} {1 - cost / on_demand:7.1%}")
# Next year the team halves the app's CPU use: demand falls 30%. Commitments cannot shrink.
c, k = TERMS["3-year commitment"], best_k(TERMS["3-year commitment"])
demand = [round(d * 0.7) for d in demand]
idle = sum(max(0, k - d) for d in demand) / (k * HOURS)
print(f"\nafter a 30% drop in demand, {idle:.0%} of the 3-year commitment's hours sit idle;"
f" best for the new demand would be {best_k(c)}, not {k}")
# A nightly batch of 1,500 instance-hours that can be interrupted: on demand or on spot?
SPOT = 0.30 # fraction of on-demand price
INTERRUPT = 0.05 # chance an instance is reclaimed in a given hour
LOST_H = 20 / 60 # work since the last checkpoint plus restart time, per interruption
needed = 1_500
spot_hours = needed / (1 - INTERRUPT * LOST_H) # redo what interruptions cost
print(f"\nbatch on demand: USD {needed * PRICE * 30:,.0f} a month;"
f" on spot: {spot_hours:,.0f} instance-hours a night,"
f" USD {spot_hours * PRICE * SPOT * 30:,.0f} a month")The rule beats every instinctive choice, and the brute-force search in the program confirms that it finds the true minimum. Committing to the minimum demand — the "safe" choice — leaves much of the saving unclaimed: about half of it on the three-year term. Committing to the peak with a one-year term costs more than buying nothing. Notice too how flat the cost curve is near its minimum: committing to the mean is almost as good as the rule. That flatness is useful, because the real decision is made about next year's demand, which nobody knows exactly.
Spot capacity suits the other kind of work: batch jobs, rendering, data processing, CI runners and training that can be checkpointed — anything that can be interrupted and resumed. The arithmetic must include the work lost to interruptions; in the program, a 5% hourly chance of being reclaimed and 20 minutes lost each time add under 2% to the hours, and the batch still costs 69% less. Spot is not guaranteed, so robust designs spread requests across several machine types and zones, handle the reclaim notice by saving state, and fall back to on-demand capacity for deadlines. The same reasoning applies to GPUs, with higher stakes, in AI infrastructure.
Data transfer: the meter that follows your architecture
Data coming into a cloud is almost always free; data going out is not. Egress to the internet is charged per gigabyte, usually in tiers that get cheaper with volume; transfer between regions is charged at a lower rate, and on some providers transfer between zones of one region is charged too, sometimes in both directions. Gateways — NAT gateways, load balancers, private-link endpoints — add charges per gigabyte processed. None of this depends on how much computing you do; it depends on where your bytes go, which makes egress the cost most directly shaped by architecture. (Typical list prices, and the 2024 waivers of egress fees for customers leaving a provider, are discussed in Edge, multi-cloud and sovereignty.)
The program below prices three common situations with illustrative tiered prices. Tiers work like income-tax brackets: each tier's price applies only to the gigabytes inside it.
TB = 1_000 # GB per TB (providers bill in GB; some use GiB)
def tiered(gb, tiers):
"""Price gb through marginal tiers [(size of tier in GB or None for the rest, USD per GB), ...]."""
cost, left = 0.0, gb
for size, price in tiers:
part = left if size is None else min(left, size)
cost += part * price
left -= part
if left <= 0:
break
return cost
# Illustrative tiers and prices of the size seen on providers' pricing pages in 2025-26.
INTERNET = [(10 * TB, 0.09), (40 * TB, 0.085), (100 * TB, 0.07), (None, 0.05)]
CDN = [(10 * TB, 0.06), (40 * TB, 0.05), (100 * TB, 0.04), (None, 0.03)]
CROSS_ZONE, NAT, ORIGIN_FILL = 0.01, 0.045, 0.02 # USD per GB
video = 300 * TB # lesson videos watched per month
designs = {}
designs["videos straight from object storage"] = tiered(video, INTERNET)
hit = 0.92 # share of bytes the CDN serves from its caches
designs["videos through a CDN (92% hit ratio)"] = tiered(video, CDN) + (1 - hit) * video * ORIGIN_FILL
# Two services in different zones exchange 2 MB per request, 40 million requests a month.
chatty = 40e6 * 2 / 1000 # GB each way
designs["chatty services across zones"] = 2 * chatty * CROSS_ZONE # billed in both directions
designs["same services, zone-aware routing"] = 0.1 * 2 * chatty * CROSS_ZONE
# Containers pull images and write to object storage through a NAT gateway: 60 TB a month.
designs["object storage via NAT gateway"] = 60 * TB * NAT
designs["object storage via private endpoint"] = 0.0 # gateway-type endpoints are often free
for name, usd in designs.items():
print(f"{name:38s} USD {usd:9,.0f} a month")
direct, cdn = list(designs.values())[:2]
print(f"\nthe CDN cuts video delivery by {1 - cdn / direct:.0%}; the average price per GB delivered "
f"falls from {tiered(video, INTERNET) / video:.4f} to {cdn / video:.4f} USD per GB")A CDN, from the Cloud networking lesson, saves here because its delivery is priced below direct egress and most bytes come from its caches; with some providers the two prices are close, and then the gains are mainly lower latency and less load on the origin. The other two lines are typical of bills that "grew by themselves". Two services in different zones exchanging a few megabytes per request cost nothing in development and real money at scale; routing each request to a replica in its own zone, where availability allows, removes most of that traffic. And workloads in private subnets that reach the provider's object store through a NAT gateway pay the gateway's processing charge on every byte, when a private endpoint for the same service often costs nothing. None of these changes makes the system worse; each needs someone to look at the network line of the bill.
Tags, allocation and unit costs
A bill organised by service answers "what did we buy?" Most decisions need "who spent it, on what, and was it worth it?" That requires tags (on Google Cloud, labels): key–value pairs on every resource, such as team, service, environment and cost-centre, which the billing export carries onto each line item. Tagging works only if it is enforced. The providers can require tags at creation and report gaps — AWS tag policies, Azure Policy rules for tags, Google Cloud labels with organisation policies, Alibaba Cloud's tag service and its tag policies — and infrastructure as code can apply them by default. Some costs cannot be tagged at all (support plans, some network charges, a shared Kubernetes cluster), so every organisation needs allocation rules for shared costs: in proportion to direct spend, to usage (bytes, requests, CPU requested per namespace, as OpenCost measures it), or split evenly. Showback reports each team's share; chargeback moves it into their budgets.
The program reads one month's bill for a language-learning app, groups it by service and by team, allocates shared and untagged costs, and computes unit costs.
from collections import defaultdict
# One month's bill for a language-learning app, as line items: (service, what was metered,
# quantity, unit price in USD, tags). Prices are made-up round examples, not any provider's.
BILL = [
("compute", "VM hours, 4 vCPU (prod)", 14_600, 0.19, {"team": "web", "env": "prod"}),
("compute", "VM hours, 4 vCPU (staging)", 5_840, 0.19, {"team": "web", "env": "staging"}),
("compute", "GPU hours (speech scoring)", 1_460, 2.10, {"team": "ml", "env": "prod"}),
("compute", "GPU hours (forgotten experiment)", 730, 2.10, {"team": "ml", "env": "dev"}),
("kubernetes", "node hours, shared cluster", 21_900, 0.096, {"team": "platform"}),
("database", "managed DB instance hours", 1_460, 0.68, {"team": "learning", "env": "prod"}),
("database", "DB storage, GB-month", 2_000, 0.115, {"team": "learning", "env": "prod"}),
("storage", "object storage, GB-month", 48_000, 0.021, {"team": "media"}),
("storage", "GET requests, per 1,000", 310_000, 0.0004, {"team": "media"}),
("storage", "unattached disks, GB-month", 3_000, 0.08, {}),
("network", "CDN delivery, GB", 160_000, 0.03, {"team": "media"}),
("network", "internet egress from region, GB", 22_000, 0.08, {}),
("network", "cross-zone transfer, GB", 95_000, 0.01, {}),
("network", "NAT gateway data processed, GB", 38_000, 0.045, {}),
("functions", "invocations, per million", 420, 0.20, {"team": "notifications"}),
("functions", "compute, GB-seconds", 31_000_000, 0.0000167, {"team": "notifications"}),
("logging", "logs ingested, GB", 9_500, 0.50, {"team": "platform"}),
]
lines = [(svc, what, qty * price, tags) for svc, what, qty, price, tags in BILL]
total = sum(cost for _, _, cost, _ in lines)
by_service, by_team = defaultdict(float), defaultdict(float)
for svc, what, cost, tags in lines:
by_service[svc] += cost
by_team[tags.get("team", "(untagged)")] += cost
print(f"total: USD {total:,.0f}\n")
print("by service by team (tag)")
left = sorted(by_service.items(), key=lambda kv: -kv[1])
right = sorted(by_team.items(), key=lambda kv: -kv[1])
for i in range(max(len(left), len(right))):
l = f"{left[i][0]:11s} {left[i][1]:8,.0f} {left[i][1] / total:4.0%}" if i < len(left) else ""
r = f"{right[i][0]:13s} {right[i][1]:8,.0f} {right[i][1] / total:4.0%}" if i < len(right) else ""
print(f"{l:29s} {r}")
# Showback: spread untagged and shared platform costs over the product teams, in proportion
# to each team's direct spend (one common rule; others use usage measures).
shared = by_team["(untagged)"] + by_team["platform"]
direct = {t: c for t, c in by_team.items() if t not in ("(untagged)", "platform")}
base = sum(direct.values())
print(f"\nshared and untagged: USD {shared:,.0f} ({shared / total:.0%}), allocated in proportion to direct spend")
for team, cost in sorted(direct.items(), key=lambda kv: -kv[1]):
print(f" {team:13s} direct {cost:8,.0f} + share {shared * cost / base:7,.0f}"
f" = {cost + shared * cost / base:8,.0f}")
ACTIVE_LEARNERS, LESSONS = 412_000, 9_300_000
print(f"\nunit cost: USD {total / ACTIVE_LEARNERS:.3f} per monthly active learner, "
f"USD {total / LESSONS * 1000:.2f} per 1,000 lessons completed")
waste = sum(c for _, what, c, _ in lines if "forgotten" in what or "unattached" in what)
print(f"easy waste (forgotten GPU, unattached disks): USD {waste:,.0f} ({waste / total:.1%} of the bill)")Three things stand out. The network and logging lines together are half the bill, larger than all compute, which is common and rarely what teams expect. Forty-one per cent of spending — the platform team's shared cluster and logging plus the untagged network and disks — belongs to no product team until an allocation rule assigns it, so the rule is a decision with consequences, and worth agreeing openly. And the bill contains easy waste: a GPU nobody uses and disks attached to nothing, 6.4% of the total.
FinOps in practice
The FinOps Foundation, a Linux Foundation project, describes the practice as an iterative cycle of three phases. Inform: make costs visible, accurate and allocated, quickly enough to act on — daily, not at the month's end. Optimise: reduce waste and buy capacity well. Operate: build cost into everyday decisions and governance. Its principles come down to a few ideas: engineers, finance, product and procurement work together; teams own the costs of what they build; decisions are driven by business value, not by cost alone; and the variable cost model of the cloud is an opportunity to be used, not a risk to be contained.
The work that most organisations find pays first:
- Budgets and anomaly alerts. Every provider can alert when spending crosses a budget or departs from its usual pattern (AWS Cost Anomaly Detection, Microsoft Cost Management, Google Cloud budgets, Alibaba Cloud's Expenses and Costs centre). A forgotten resource found in a day costs a thirtieth of one found on the invoice.
- Clean-up: unattached disks, old snapshots, idle load balancers and addresses, abandoned experiments. Tags with an owner and an expiry date make this routine rather than archaeology.
- Rightsizing: instances, databases and containers sized from measured utilisation rather than guesses, and Kubernetes resource requests set from what pods use, since the cluster pays for requests.
- Scheduling: development and test environments switched off outside working hours. Running 12 hours a day on weekdays instead of all week removes 108 of 168 hours, 64% of their cost.
- Storage lifecycle rules that move old objects to cheaper classes and delete what nobody needs, and log retention set deliberately.
- Buying well: commitments for the steady base, spot for interruptible work, on demand for the rest — revisited every quarter as the base changes.
- Cost in design and review: estimates in architecture reviews, and cost-difference reports on infrastructure pull requests (see infrastructure as code), so the price of a change is seen before it is merged.
Each provider's console offers analysis and recommendations (AWS Cost Explorer, Microsoft Cost Management, Google Cloud Billing, Alibaba Cloud's Expenses and Costs); organisations using several clouds export FOCUS data into a warehouse of their own or use open-source and commercial tools on top. Two cautions from practice. Recommendations are made by systems that do not know your SLOs: a rightsizing that removes the headroom from the autoscaling lesson saves money until the next promotion. And savings that cost engineering time are not free; a week spent saving USD 50 a month is a poor trade.
The cost the invoice does not show
Every instance-hour also uses electricity, and through it causes greenhouse-gas emissions, as well as water for cooling and the emissions embodied in manufacturing the hardware. The International Energy Agency's 2025 report Energy and AI estimated that data centres used about 1.5% of the world's electricity in 2024 and projected that their use would more than double by 2030, driven largely by AI. For a single workload, a first estimate is
where the power usage effectiveness (PUE) is the data centre's total energy divided by its IT equipment's energy (industry surveys put the average near 1.5; the largest providers report about 1.1 to 1.2 for their own sites), and the carbon intensity — grams of CO₂-equivalent per kilowatt-hour — depends on the region's electricity mix and changes hour by hour. The program compares a nightly batch job in three regions, with illustrative figures throughout.
import math
# A nightly batch job: 1,500 instance-hours. Every figure below is an illustrative example.
INSTANCE_HOURS = 1_500
KWH_PER_INSTANCE_HOUR = 0.12 # the servers' electricity for one 4-vCPU instance-hour
PUE = 1.2 # data-centre overhead: cooling, power conversion, lighting
DAYS = 30
def intensity_b(hour):
"""Grid carbon intensity in region B (gCO2e per kWh): gas at night, solar at midday."""
return 420 - 220 * max(0.0, math.sin(math.pi * (hour - 6) / 12))
REGIONS = { # name: (USD per instance-hour, grid intensity by hour of day)
"A (hydro and wind)": (0.22, lambda h: 35),
"B (gas and solar)": (0.20, intensity_b),
"C (mostly coal)": (0.17, lambda h: 690),
}
def run(region, hours):
price, grid = REGIONS[region]
per_hour = INSTANCE_HOURS / len(hours)
kwh = sum(per_hour * KWH_PER_INSTANCE_HOUR * PUE for h in hours) * DAYS
kg = sum(per_hour * KWH_PER_INSTANCE_HOUR * PUE * grid(h) for h in hours) * DAYS / 1000
return INSTANCE_HOURS * price * DAYS, kwh, kg
night, midday = list(range(0, 6)), list(range(10, 16))
options = [("C (mostly coal)", night), ("B (gas and solar)", night),
("B (gas and solar)", midday), ("A (hydro and wind)", night)]
CARBON_PRICE = 100 / 1000 # an illustrative internal carbon price: USD 100 per tonne
print(f"{'region':20s} {'when':7s} {'USD/month':>9s} {'MWh':>5s} {'t CO2e':>7s} {'carbon at USD 100/t':>20s}")
for region, hours in options:
usd, kwh, kg = run(region, hours)
when = "night" if hours == night else "midday"
print(f"{region:20s} {when:7s} {usd:9,.0f} {kwh / 1000:5.1f} {kg / 1000:7.2f} {kg * CARBON_PRICE:20,.0f}")Region choice dominates: the same work emits nearly twenty times as much on a coal-heavy grid as on a hydro and wind grid. Time matters too: moving the job to midday in the solar region nearly halves its emissions at the same price. And the financial signal is weak: even at an internal carbon price of USD 100 per tonne, the emissions difference between the cheapest and cleanest regions is worth a fraction of their price difference, so a lower-carbon choice is often a deliberate decision rather than a by-product of saving money. Region is also constrained by latency, by the services available and by where data may legally live.
Each large provider publishes emissions estimates for its customers' usage — AWS through its Sustainability service, Microsoft through carbon optimisation in Azure, Google Cloud through Carbon Footprint, and Alibaba Cloud through its Energy Expert carbon-accounting service, which includes a footprint of cloud products — each with its own method and delay. Open-source tools such as Cloud Carbon Footprint and the CNCF's Kepler estimate from usage or from power measurements, and grid data comes from operators and from organisations such as Electricity Maps and Ember. The Green Software Foundation's SCI specification defines emissions per unit of work — the environmental counterpart of a unit cost. The happy overlap is that most FinOps work — deleting idle resources, rightsizing, scheduling, sending fewer bytes — reduces energy too. Data-centre energy and carbon-aware scheduling are taken further in Sustainable and confidential cloud.
Common misconceptions
Misconception
"Commit to as much as possible: the discount is free money." A commitment is paid whether used or not. Above the break-even level, committed instances cost more than the on-demand capacity they replace, and a drop in demand turns the discount into idle spending for the rest of the term.
Misconception
"Spot capacity is the same machine, cheaper." It is the same machine, reclaimable at short notice. It is cheap for work that checkpoints and restarts, and expensive for anything that loses hours of work or users' requests when interrupted.
Misconception
"A stopped instance costs nothing." Its disks, snapshots, reserved addresses and licences go on billing. Stopping saves compute; deleting saves everything.
Misconception
"The cheapest region is the best region." Price is one input among latency, available services, data-residency law, egress to where users and data are, and carbon intensity. A cheap region far from users can cost more in transfer than it saves in compute.
Misconception
"FinOps means the finance team cutting engineering budgets." It means engineers seeing and owning the cost of their decisions, with finance and product, and spending where it creates value — sometimes by spending more.
Exercises
1. Cost and FinOps
Warm-upHumanA team's test environment runs 12 instances at an example on-demand price of USD 0.50 per instance-hour, all week, every week. The team agrees to run it only from 07:00 to 19:00, Monday to Friday. How many US dollars does that save per week?
2. Cost and FinOps
CoreHumanOver a 720-hour month, a fleet's hourly demand takes only the values 10, 14, 18, 22, 26 or 30 instances. Demand is at least 10 instances in all 720 hours, at least 14 in 600 hours, at least 18 in 420, at least 22 in 300, at least 26 in 120 and at least 30 in 24. A one-year commitment costs 60% of the on-demand price, paid every hour. How many instances should the team commit to?
3. Cost and FinOps
CoreComputationalWrite best_commitment(demand, c). demand lists the instances needed in each hour; committed capacity costs a fraction c of the on-demand price for every hour of the period, used or not; demand above the commitment is bought on demand. Return the whole number of instances to commit to that minimises the total cost. The starter commits only to the minimum demand, which is safe but usually too little.
4. Cost and FinOps
CoreComputationalWrite tiered_cost(gb, tiers) for egress priced in marginal tiers, like income-tax brackets: tiers is a list of (size_in_gb, usd_per_gb) in order, with None as the size of the last tier, and each tier's price applies only to the gigabytes that fall inside it. The starter charges every gigabyte at the price of the tier the total lands in.
5. Cost and FinOps
CoreHumanOver a year, an app's monthly cloud bill rose by 20%, while its monthly active users rose by 50%. By what percentage did the cost per monthly active user change? Give a whole number; use a negative number for a fall.
6. Cost and FinOps
CoreHumanA team's bill shows large data-transfer charges. Which changes are likely to reduce them without making the service worse? Select all that apply.
7. Cost and FinOps
CoreHumanIn the lesson's carbon program, a nightly batch job could run in region C (cheapest, mostly coal), region B (gas and solar) or region A (hydro and wind, most expensive). Which change reduced emissions without raising the bill?
Further reading and resources
- FinOps Framework · FinOps FoundationThe Linux Foundation project's description of FinOps principles, phases, personas and capabilities.
- FOCUS — FinOps Open Cost and Usage SpecificationAn open specification for billing data, so that bills from different providers can be compared.
- OpenCostA CNCF project that allocates Kubernetes and cloud costs to workloads.
- AWS pricing
- Azure pricing
- Google Cloud pricing
- Alibaba Cloud pricing
- AWS: what are Savings Plans?
- Azure: reservations and savings plans
- Google Cloud: committed use discounts
- Alibaba Cloud: savings plans
- Software Carbon Intensity (SCI) specification · Green Software FoundationA method for a software system's emissions per unit of work, published as ISO/IEC 21031:2024.
- Energy and AI · International Energy Agency · 2025
- GHG ProtocolThe standards behind location-based and market-based emissions accounting.
- Cloud Carbon FootprintAn open-source tool that estimates emissions from cloud usage data.