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.
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.
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.
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 financeWatch out
Leaving out the owner key, so nobody can be asked about a resource.
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.
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.
Go deeper