Lesson 1 of 3 FinOps for Engineers

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.

Sort into groups

Usage or rate?

Exam skills 1.1.2 · 7.4.1

Decide whether each change lowers cost by reducing usage or by lowering the rate.

Log in to try this activity Interactive activities are free with an account.

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.

Why a bill can far exceed an estimate that covered only compute and storage. Those dimensions match, so the gap comes from dimensions the estimate left out, usually data transfer or requests. Filtering the billing data by usage type finds it; the fix is often architectural.
Band lengths are illustrative.

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.

On-demand
What you agree toNothing; pay the standard rate for what you use
Typical discountNone (the baseline)
Main riskHighest unit price
ExamplesStandard virtual machine pricing
Choose when Usage is new, variable or short-lived
Commitment-based discount
What you agree toA level of usage or hourly spend for one or three years
Typical discountSubstantial; larger for longer terms and up-front payment
Main riskPaying for commitment you do not use
ExamplesAWS Savings Plans and Reserved Instances, Azure Reservations and savings plan for compute, Google Cloud committed use discounts
Choose when Usage is steady and will continue for the term
Spot or preemptible
What you agree toUse spare capacity that the provider can reclaim
Typical discountDeep, often the largest available
Main riskInterruption at short notice
ExamplesAWS Spot Instances, Azure Spot Virtual Machines, Google Cloud Spot VMs
Choose when Work is fault-tolerant and can be interrupted

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.

Match the pairs

Pricing models

Exam skills 1.1.2

Match each pricing model with its description.

Log in to try this activity Interactive activities are free with an account.

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.

Fill in the value

Estimating a design

Exam skills 1.1.2

Estimate the monthly cost of design components from usage and price.

Log in to try this activity Interactive activities are free with an account.

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.

Worked example

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.

Worked example

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.

Check yourself

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.