2026-09-17 · 8 min read
Building an AWS Cost Dashboard with Cost Explorer + Athena
Cost Explorer is great for browsing, but for real FinOps you want queryable data. Here's how to build a cost dashboard on the Cost and Usage Report with Athena and QuickSight.

Building an AWS Cost Dashboard with Cost Explorer + Athena
Cost Explorer is a fine place to start a FinOps investigation, but it hits a ceiling fast: limited grouping, no custom SQL, and no easy way to slice by your own tagging scheme. When you need to answer "which team's untagged resources cost us the most last month, by service, by region," you want the raw data in a query engine. That's the Cost and Usage Report (CUR) + Athena pattern.
The two tools, and when each fits
- Cost Explorer: fast, visual, zero setup. Great for trends, anomaly spotting, and quick "what changed this week" questions. Use it daily.
- CUR + Athena: the most granular billing data AWS produces (line-item level, hourly, every resource and tag), queryable with SQL. Use it for deep analysis, chargeback/showback, and custom dashboards.
You want both: Cost Explorer for the glance, Athena for the investigation.
Step 1: Enable the Cost and Usage Report
The CUR is the foundation, it dumps detailed billing data to S3 on a schedule.
- In Billing → Cost & Usage Reports, create a report.
- Enable resource IDs and choose Parquet format (much cheaper and faster to query than CSV).
- Point it at an S3 bucket and select Athena integration: AWS provides a CloudFormation template that wires up Glue + Athena automatically.
Within ~24h you'll have CUR data landing in S3, partitioned by month.
Step 2: Query it with Athena
Once the Glue crawler has cataloged the data, you query it like any table. A few high-value queries:
Spend by service this month:
SELECT line_item_product_code AS service,
ROUND(SUM(line_item_unblended_cost), 2) AS cost
FROM cur_table
WHERE billing_period = '2026-09'
GROUP BY line_item_product_code
ORDER BY cost DESC
LIMIT 20;
Untagged spend: the FinOps classic:
SELECT line_item_product_code AS service,
ROUND(SUM(line_item_unblended_cost), 2) AS cost
FROM cur_table
WHERE resource_tags_user_team IS NULL
AND billing_period = '2026-09'
GROUP BY line_item_product_code
ORDER BY cost DESC;
That second query is gold: it tells you exactly how much spend you can't attribute to a team, which is usually the first thing leadership asks about.
Cost by team (chargeback):
SELECT resource_tags_user_team AS team,
ROUND(SUM(line_item_unblended_cost), 2) AS cost
FROM cur_table
WHERE billing_period = '2026-09'
GROUP BY resource_tags_user_team
ORDER BY cost DESC;
Step 3: Visualize with QuickSight (or Grafana)
Athena query results feed straight into a dashboard:
- QuickSight connects natively to Athena: build cost-by-team, cost-by-service, and month-over-month trend visuals. SPICE caching keeps it snappy and cheap.
- Prefer Grafana? The Athena data source plugin works too, so you can put cost panels next to your Prometheus/Grafana operational dashboards.
Schedule the dashboard to email leadership monthly, visible cost data changes behavior more than any policy.
Watch the cost of your cost dashboard
A small irony: Athena charges per TB scanned, so a naive setup can run up its own bill.
- Use Parquet (columnar) for the CUR: Athena only scans the columns you select.
- Partition by billing period and always filter on it, so queries scan one month, not all history.
- Set a workgroup data-scan limit as a guardrail against a runaway query.
Done right, this costs a few dollars a month and pays for itself many times over.
Tagging is the real prerequisite
None of the per-team analysis works without a consistent tagging strategy. Enforce it:
- Define required tags (
team,env,cost-center,project). - Enforce with AWS Organizations Tag Policies and SCPs (see my multi-account org).
- Use Cost Allocation Tags (activate them in the billing console) so they appear in the CUR.
The dashboard surfaces what it costs; tags tell you who and why. Without tags, you have a pretty chart and no accountability.
The short version
- Cost Explorer for the glance, CUR + Athena for the investigation.
- Enable the CUR in Parquet with resource IDs and Athena integration.
- SQL unlocks the questions Cost Explorer can't answer, untagged spend, chargeback, custom slices.
- Visualize in QuickSight or Grafana; email it monthly.
- Partition + Parquet to keep Athena cheap; enforce tagging to make it meaningful.
Standing up FinOps practice, dashboards, tagging, accountability, is part of my consulting work. Get in touch.