Fundamentals of Cloud Cost for Engineers
Every architecture and operational decision an engineer makes has a price. This lesson explains how cloud charges are built, which pricing dimensions and models engineers meet every day, and how to reason about the cost of a design before it is deployed.
Learning outcomes
After completing this lesson, you will be able to:
- Explain how every cloud charge combines a usage quantity and a rate.
- Identify the pricing dimensions behind common engineering decisions.
- Describe per-second metering, tiered pricing and free allowances.
- Compare on-demand, commitment-based and spot pricing models.
- Describe how to estimate the cost of a design from its assumptions.
- Distinguish a usage effect from a rate effect in a cost change.
Cost equals usage multiplied by rate
Every cloud charge, however complex the bill looks, combines a usage quantity with a rate. A virtual machine that runs for 730 hours at USD 0.20 per hour costs USD 146 a month. A bucket that holds 5,000 gigabytes at USD 0.023 per gigabyte-month costs USD 115. Providers publish the rates, and the bill multiplies them by what was actually consumed.
This formula divides optimization into two families. Usage optimization reduces the quantity: fewer hours, smaller resources, less data stored or moved. Rate optimization reduces the price per unit: commitment discounts, negotiated pricing and spot capacity. Engineers control most usage through design and operation; the central FinOps team, with procurement, controls most rate decisions. Recognizing which side of the formula a problem sits on tells you who should act.
Usage or rate?
Pricing dimensions engineers control
A single service is usually priced on several pricing dimensions at once, and each corresponds to an engineering decision. The following list describes the dimensions that appear most often and the decisions behind them.
- Time: compute and many managed services charge per second or hour of running. Decisions: schedules, autoscaling, shutting down idle resources.
- Capacity: instance size, provisioned throughput, provisioned IOPS, GPU type. Decisions: rightsizing and instance family selection.
- Storage volume: gigabytes per month by tier. Decisions: retention, tiering, compression and deletion.
- Requests: API calls, function invocations, queries and messages. Decisions: batching, caching and efficient code.
- Data transfer: egress, inter-region and cross-zone traffic. Decisions: architecture placement, CDNs and private endpoints.
- Tokens: input and output tokens for generative AI. Decisions: model choice, prompt length and caching.
- Location: the same service has different prices in different regions. Decisions: region choice.
Because a workload combines many services, each with several dimensions, the dimension that nobody modeled often becomes the surprise on the bill. Data transfer and request charges are the usual culprits.
The following diagram shows how an estimate that covers only some dimensions differs from the bill.

Pricing models
Providers sell the same capacity under different pricing models that trade flexibility for price. Engineers need to understand them because workload design determines which model a workload can use. The following comparison sets out the three main models.
A workload designed to tolerate interruption can run on spot; a workload with a steady baseline can be covered by commitments; a workload that is new or changing quickly stays on demand until its usage settles.
Pricing models
Estimating the cost of a design
Engineers can estimate a design's monthly cost before building it by listing each component, identifying its pricing dimensions, estimating the quantity of each and multiplying by the published rate. Provider calculators, such as the AWS Pricing Calculator, the Azure pricing calculator and the Google Cloud Pricing Calculator, automate the arithmetic but not the assumptions. The assumptions, such as requests per second, data retained and traffic leaving the region, are what engineers must supply.
An estimate is most useful when its assumptions are written down. When the first bill arrives, comparing actual quantities with assumed ones shows which assumption was wrong and improves the next estimate.
Estimating a design
How usage is metered and priced
Providers meter usage in small increments, but the details affect the bill. Many virtual machines and containers are billed per second after a short minimum, such as one minute, while some services, operating system licenses and older pricing models bill per full hour. A job that starts 500 short-lived instances a day pays the minimum charge 500 times, so very short tasks are often cheaper in a serverless or batch service that bills per request or per millisecond.
Many dimensions use tiered pricing: the price per unit falls as volume rises within a billing period. Object storage, internet egress and some AI services are typical examples. Tiers are usually calculated per account or per organization, so consolidating usage in one billing organization can lower the average rate. Tiering also means that the marginal cost of one more gigabyte differs from the average cost, which matters when estimating the effect of a change.
Finally, some services include a free tier or free allowance, such as a number of requests or gigabytes each month. Free allowances make small test workloads look cheap; an estimate for production volume must use the paid rate beyond the allowance.
Finding the expensive dimension
A log-processing service was estimated at USD 4,000 a month for compute and storage. The first bill is USD 9,500. Compute and storage match the estimate. What should the engineer check?
The estimate covered two dimensions only. Filtering the billing data for the service by usage type is the first step. A difference of USD 5,500 with matching compute and storage usually comes from data transfer, for example logs shipped from other regions or through a NAT gateway, or from requests, such as millions of small writes to object storage. Once found, the fix is often architectural: batching small writes into larger objects, or processing logs in the region where they are produced. The estimate template should gain the missing dimension.
Usage or rate?
A team's compute cost rose from USD 30,000 to USD 36,000 in a month. Instance-hours were unchanged at 150,000. Who should investigate?
With unchanged usage, the average rate rose from USD 0.20 to USD 0.24 per hour. That is a rate effect, such as a commitment expiring or usage moving to a more expensive region or instance family. If the team moved to a more expensive family, it is a mix effect that the team owns; if a commitment expired, the central FinOps team owns it. The engineer's first check is whether the instance families or regions changed; if not, the question goes to the central team.
A team batches millions of small object writes into fewer, larger objects. Which side of cost = usage x rate does this change, and which pricing dimension?
Show answer
It changes usage, on the requests dimension: fewer write requests are made, while the price per request is unchanged. It is a usage optimization that the engineering team owns.
Exam Tips
Remember for the exam
- Every charge is usage x rate; engineers mainly control usage, the central team mainly controls rate.
- Each pricing dimension maps to an engineering decision; data transfer and requests are often missed.
- Workload design determines whether on-demand, commitment or spot pricing can be used.
- Write down estimate assumptions so they can be checked against the bill.