Cloud cost and FinOps: AWS

Sefism.

Chapter 02

Reading the bill and tagging

The cost tool and detailed export on your cloud, tags and labels, a tagging policy template, enforcement, untaggable spend and your first billing query.

AWS Cost Explorer

Also called Cost Explorer, cost and usage reports, saved reports

What
AWS's interactive cost view: pick a range and granularity, group by service, account, Region, usage type, tag or cost category, filter, and switch between unblended, amortised and net costs.
Why
It answers most weekly questions in minutes, and its forecast and Savings Plans pages start rate work.

Watch out

Grouping only by service, which says EC2 grew but not which account or usage type drove it.

AWS Data Exports and CUR 2.0

Also called CUR, Cost and Usage Report, CUR 2.0, FOCUS export, Athena

What
Scheduled exports of detailed billing data to S3: CUR 2.0, FOCUS 1.2 with AWS columns, cost optimisation recommendations and carbon emissions, with the columns you choose.
Why
Line-level data you can query with SQL in Athena or your own tools, beyond what the console shows.
SQL
SELECT line_item_product_code AS service,
  SUM(line_item_unblended_cost) AS cost
FROM cur2
WHERE billing_period = '2026-09'
GROUP BY 1 ORDER BY 2 DESC LIMIT 10;

Watch out

Creating the export the day you need history: it starts from creation.

Tags and labels for cost

Also called tags, labels, resource tags, cost allocation tags

What
Key-value pairs on resources, such as team=payments, that flow into billing data so cost can be grouped by team, product, environment or cost centre.
Why
They add the business context the cloud does not know, within the boundaries accounts or projects already give.

Watch out

Free-form keys, so Team, team and owner_team each hold a third of the cost.

Tagging policy

Also called tag standard, labelling policy, tag governance

What
A short written agreement on required tag keys, allowed values, who owns each list, where tags are applied, how compliance is measured and what happens to untagged resources.
Why
It turns tagging from a hope into a measurable standard teams can follow.

Watch out

Thirty required keys nobody applies instead of five everybody does.

Tagging policy template

Also called tag policy example, required tags, tag schema

What
A starting template with five required keys, their allowed values, and how the policy is applied and measured.
Why
Copy it, change the values to your organisation's, and agree it with finance and team leads.
YAML
required:
  cost-center: [cc-1001, cc-1002, shared]
  team: [payments, search, platform]
  env: [prod, staging, dev, sandbox]
  app: free text, lowercase, hyphens
  owner: team email or chat channel
format: lowercase keys and values, no spaces
applied: in IaC modules, checked in CI
measured: % of cost with all keys, monthly
untagged: owner notified, removed after 14 days
review: twice a year with finance

Watch out

Leaving out the owner key, so nobody can be asked about a resource.

Cost allocation tag activation

Also called activate tags, user-defined tags, AWS-generated tags, backfill, tag policies

What
Tags show in AWS cost tools only after the management account activates them as cost allocation tags; changes can take 24 hours. Activation can be backfilled up to twelve months where resources had the tag.
Why
Without activation, perfect tagging is invisible in Cost Explorer and CUR. Tag policies in AWS Organizations help keep values consistent.

Watch out

Tagging everything and forgetting to activate the keys.

Untaggable and shared spend

Also called untagged cost, unallocated cost, shared cost

What
Cost that cannot carry your tags: support, taxes, some data transfer, marketplace charges, centrally bought commitments and shared platforms.
Why
Reporting it openly keeps team totals adding up to the invoice and shows where split rules are needed.

Watch out

Leaving untagged cost out of team reports, so totals never match the bill.

Billing queries in SQL

Also called cost query, DuckDB, Athena, BigQuery, FOCUS query

What
SQL over a billing export answers what the console cannot: cost by tag and service, top resources, week-on-week change. This example runs on FOCUS data, so it works for any provider.
Why
Three saved queries (by service, by team with an untagged bucket, top resources) cover most weekly questions.
SQL
SELECT COALESCE(Tags['team'], 'untagged') AS team,
  ServiceName,
  SUM(EffectiveCost) AS cost
FROM focus
WHERE ChargePeriodStart >= DATE '2026-09-01'
  AND ChargePeriodStart < DATE '2026-10-01'
GROUP BY ALL
ORDER BY cost DESC;

Watch out

A query that silently drops rows with no tag, so the total is smaller than the invoice.

02 · Reading the bill and tagging2 / 10