From Manual Cost Analysis to Automated Insights: Building a Multi-Level Cost Analysis Dashboard in QuickSight.

04 / Jul / 2025 by Akshat Mittal 0 comments

If you’ve ever tried to track AWS costs with just Cost Explorer and spreadsheets, you’ll know the pain. On paper it sounds simple: export some data, make a pivot table, maybe throw a chart on top. In practice? You’re stuck chasing down anomalies with five browser tabs open, three CSVs half-filtered, and a sinking feeling that you’re missing something.

That was us not long ago. Our workloads were scaling, accounts kept multiplying, and the monthly review ritual was becoming this painful mix of detective work and educated guessing. Eventually we hit a point where we said: enough. We needed a proper system — something automated, multi-level, and easy for both engineers and finance folks to use.

This is the story of how we went from manual exports to building a multi-layer cost analysis dashboard with Athena and QuickSight. If you’re in DevOps, FinOps, or just the unlucky soul tasked with explaining “why the AWS bill jumped again,” I think you’ll recognize a lot of this.

The Old Way: Spreadsheet Olympics

Our process started the way it does for most teams. Someone would:

Open Cost Explorer.

Export service-level data for the past two weeks.

Load it into Excel or Google Sheets.

Try to spot anything weird.

We’d highlight S3 or EC2 rows, add a couple formulas, then sit in a meeting trying to connect the dots. “Looks like EC2 went up 20% last week.

A few specific problems stood out:

  1. Slow: Just pulling and prepping the data could take half a day.
  2. Shallow: You could see EC2 spend was up, but not which instances were responsible.
  3. Late: By the time we noticed a spike, the money was already gone.
  4. Error-prone: Filters misapplied, wrong time ranges, duplicate data — we’ve all been there.

The “spreadsheet Olympics” worked when the bill was small. Once it crossed a few hundred thousand a month? Forget it. We needed to zoom in faster and with way more detail.

The Turning Point

Thist came during one particularly painful review. Our EC2 line item was up by about 40% week-over-week. Everyone stared at the spreadsheet. Someone guessed “maybe it’s new QA servers?” Another thought it was “probably dev workloads.” Nobody was sure.
We pulled up the raw CUR (Cost and Usage Report) in Athena later that day, ran a quick SQL query, and boom: we found the culprit. A set of m5.2xlarge instances running 24/7 in a forgotten test environment. Cost Explorer alone never would have shown that clearly.
That’s when it clicked: if CUR + Athena could give us the answers instantly, why not layer QuickSight on top and automate the whole thing?

The Solution: Automated Cost Intelligence via QuickSight

Here’s what our architecture looks like now:

  1. CUR in S3: This is the source of truth, delivered daily.
  2. Athena: SQL queries over the CUR. We built views to simplify common breakdowns (by service, by usage type, by resource tags).
  3. QuickSight: Dashboards that visualize those views. Drill-down enabled, interactive filters, the whole deal.

The beauty is it updates itself. No more exporting CSVs or chasing data freshness.

How the Dashboard Works (Three Layers)

We structured the dashboard as three sheets, each one drilling deeper.

1. Service-Level Cost Comparison:

High-level, quick and dirty. Compares costs across AWS services:

  • Weekly Comparison: Displays the costs for the last two completed weeks for each AWS service, along with the absolute cost difference.
abc

Weekly Service Based Billing

  • Monthly Comparison: Similar layout and logic, comparing the last two completed months instead of weeks.
abc

Monthly Service Based Billing

If EC2 or S3 suddenly spikes, this view makes it obvious. It’s basically our “smoke alarm.”

2. Usage-Based Cost Analysis for a Selected Service:

This sheet allows a focused analysis of cost breakdown based on usage types within a selected AWS service. It dynamically updates based on the selected service from the first sheet.

Capabilities:

  • Pick a service and see which usage types are driving the increase. For EC2, that might be On-Demand instance hours (BoxUsage). For S3, it might be data transfer or API requests.
  • This was the game-changer. Instead of just saying “EC2 is up,” we could say “On-Demand usage hours doubled.”
abc

Usage Based Billing

This level of insight helps narrow down specific areas causing the increase in spend, offering better control over high-cost operations

3. Resource-Level Cost Analysis for Selected Usage Type

This is where the detective work gets easy. We pull in:

  • Resource IDs.
  • Tags (Account, Environment, Channel, Owner).
  • Exact cost + usage numbers.
abc

Resource Based Billing

Without this, anomalies were fuzzy. With it, they’re crystal clear.

Pivot Table at the Account Level With AWS Tags

A pivot table that displays the price of each service according to usage type has been made in order to mimic the visibility provided by the AWS Billing console. Although it offers more customisation and granularity, this view is very similar to the “Bills” section of the AWS console.

The Reason for Developing the Account-Level Pivot Table

This pivot table was created to support projects that enable content owners to:

  • Establish, plan, and automate news, FAST, and live video streaming channels.
  • Distribute those channels among various endpoints and platforms.
  • Learn about performance, cost-effectiveness, and channel-level content delivery.

Because of this architecture, every channel frequently functions within the system as a separate client or unit. As a result, content owners must:

  • Recognize the prices and savings offered by each channel.
  • Attribute AWS usage accurately to individual accounts and channels.
  • Make informed decisions around resource optimization and pricing strategy.

The purpose of this pivot table is to give an organized and understandable breakdown of AWS prices and discounts at the Account ID and Account Name levels. The use of metadata extracted from resource tags, which enables clients to view cost and discount attribution based on their unique account and channel details, is what makes this approach unique.

abc

Account Level Table

Tag-Based Identification

The values for Account ID, Account Name, Channel ID, and Channel Name are extracted from the resource tags associated with the respective AWS resources. These tags are parsed and joined with the billing line items to produce a complete view of the cost structure, mapped accurately to client-specific identifiers.

Attribution of Discounts

The table has distinct columns to show:

  • Usage-based cost
  • Total effective cost
  • Discounts applied, including:

Enterprise Discount Program (EDP)

Private Rate Card Discounts

Bundled Discounts

Value Proposition

This structured and tag-enriched view helps clients understand:

  • Which services are contributing to their AWS bills.
  • What level of discount is being applied.
  • How usage is distributed across their own internal account and channel identifiers.

More transparent chargeback and showback reporting between organisational units is made possible by this format.

Why Not Just Use AWS Cost Explorer?

While AWS Cost Explorer provides a native interface for cost analysis, it comes with certain limitations:

Feature AWS Cost Explorer Custom Pivot Table View
Tag-based account/channel mapping Limited flexibility Full customization via tags
Custom column hierarchy Not supported Fully configurable
Discounts breakdown Aggregated view Separated discount attribution
Offline export and manipulation Manual CSV download Structured data, easier automation
Resource-level traceability Partially supported Fully supported

This pivot table approach is particularly beneficial when there is a need to provide cost visibility per client, per channel, or per project, in a way that aligns with internal organizational tagging strategies.

Conclusion

Switching from manual reviews to an automated, tag-driven QuickSight dashboard has been a game-changer for us.

We’re no longer stuck in spreadsheet hell. We can see anomalies almost in real time. Finance finally has the breakdowns they wanted. Engineers can trace spend back to actual resources. And cost reviews have gone from dreaded chores to genuinely useful conversations.

If you’re still leaning only on Cost Explorer and CSV exports, take it from me: it’s worth building something better. Start small, keep tags clean, and let QuickSight + Athena do the heavy lifting.

Because at the end of the day, it’s not just about saving money. It’s about clarity, accountability, and being able to answer the question we all hate: “Why did the AWS bill go up again?”

To learn how to create cost and usage dashboards in Amazon QuickSight for a comprehensive view of services used across all AWS accounts within your AWS Organization, you can refer to Mastering AWS Cost Management with QuickSight which provides a complete setup guide.

FOUND THIS USEFUL? SHARE IT

Leave a Reply

Your email address will not be published. Required fields are marked *