{"id":72783,"date":"2025-07-04T13:59:34","date_gmt":"2025-07-04T08:29:34","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=72783"},"modified":"2025-09-09T14:49:39","modified_gmt":"2025-09-09T09:19:39","slug":"from-manual-cost-analysis-to-automated-insights-building-a-multi-level-cost-analysis-dashboard-in-quicksight","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/from-manual-cost-analysis-to-automated-insights-building-a-multi-level-cost-analysis-dashboard-in-quicksight\/","title":{"rendered":"From Manual Cost Analysis to Automated Insights: Building a Multi-Level Cost Analysis Dashboard in QuickSight."},"content":{"rendered":"<p>If you\u2019ve ever tried to track AWS costs with just Cost Explorer and spreadsheets, you\u2019ll know the pain. On paper it sounds simple: export some data, make a pivot table, maybe throw a chart on top. In practice? You\u2019re stuck chasing down anomalies with five browser tabs open, three CSVs half-filtered, and a sinking feeling that you\u2019re missing something.<\/p>\n<p>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 \u2014 something automated, multi-level, and easy for both engineers and finance folks to use.<\/p>\n<p>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\u2019re in DevOps, FinOps, or just the unlucky soul tasked with explaining \u201cwhy the AWS bill jumped again,\u201d I think you\u2019ll recognize a lot of this.<\/p>\n<h3>The Old Way: Spreadsheet Olympics<\/h3>\n<p>Our process started the way it does for most teams. Someone would:<\/p>\n<p>Open Cost Explorer.<\/p>\n<p>Export service-level data for the past two weeks.<\/p>\n<p>Load it into Excel or Google Sheets.<\/p>\n<p>Try to spot anything weird.<\/p>\n<p>We\u2019d highlight S3 or EC2 rows, add a couple formulas, then sit in a meeting trying to connect the dots. \u201cLooks like EC2 went up 20% last week.<\/p>\n<p>A few specific problems stood out:<\/p>\n<ol>\n<li><strong>Slow:<\/strong>\u00a0Just pulling and prepping the data could take half a day.<\/li>\n<li><strong>Shallow:<\/strong>\u00a0You could see EC2 spend was up, but not which instances were responsible.<\/li>\n<li><strong>Late<\/strong>: By the time we noticed a spike, the money was already gone.<\/li>\n<li><strong>Error-prone:<\/strong>\u00a0Filters misapplied, wrong time ranges, duplicate data \u2014 we\u2019ve all been there.<\/li>\n<\/ol>\n<p>The \u201cspreadsheet Olympics\u201d 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.<\/p>\n<h3><strong>The Turning Point<\/strong><\/h3>\n<p>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 \u201cmaybe it\u2019s new QA servers?\u201d Another thought it was \u201cprobably dev workloads.\u201d Nobody was sure.<br \/>\nWe 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.<br \/>\nThat\u2019s when it clicked: if CUR + Athena could give us the answers instantly, why not layer QuickSight on top and automate the whole thing?<\/p>\n<p><strong style=\"font-size: 1.14286rem;\">The Solution: Automated Cost Intelligence via QuickSight<\/strong><\/p>\n<p>Here\u2019s what our architecture looks like now:<\/p>\n<ol>\n<li><strong>CUR in S3<\/strong>: This is the source of truth, delivered daily.<\/li>\n<li><strong>Athena<\/strong>: SQL queries over the CUR. We built views to simplify common breakdowns (by service, by usage type, by resource tags).<\/li>\n<li><strong>QuickSight<\/strong>: Dashboards that visualize those views. Drill-down enabled, interactive filters, the whole deal.<\/li>\n<\/ol>\n<p>The beauty is it updates itself. No more exporting CSVs or chasing data freshness.<\/p>\n<h3>How the Dashboard Works (Three Layers)<\/h3>\n<p>We structured the dashboard as three sheets, each one drilling deeper.<\/p>\n<h4>1. Service-Level Cost Comparison:<\/h4>\n<p>High-level, quick and dirty. Compares costs across AWS services:<\/p>\n<ul>\n<li><strong>Weekly Comparison<\/strong>: Displays the costs for the last two completed weeks for each AWS service, along with the absolute cost difference.<\/li>\n<\/ul>\n<div id=\"attachment_72778\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-72778\" decoding=\"async\" loading=\"lazy\" class=\"size-large wp-image-72778\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.34.34\u202fPM-1024x429.png\" alt=\"abc\" width=\"625\" height=\"262\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.34.34\u202fPM-1024x429.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.34.34\u202fPM-300x126.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.34.34\u202fPM-768x322.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.34.34\u202fPM-624x262.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.34.34\u202fPM.png 1288w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-72778\" class=\"wp-caption-text\">Weekly Service Based Billing<\/p><\/div>\n<ul>\n<li><strong>Monthly Comparison<\/strong>: Similar layout and logic, comparing the last two completed months instead of weeks.<\/li>\n<\/ul>\n<div id=\"attachment_72779\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-72779\" decoding=\"async\" loading=\"lazy\" class=\"size-large wp-image-72779\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.37.14\u202fPM-1024x348.png\" alt=\"abc\" width=\"625\" height=\"212\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.37.14\u202fPM-1024x348.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.37.14\u202fPM-300x102.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.37.14\u202fPM-768x261.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.37.14\u202fPM-624x212.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.37.14\u202fPM.png 1296w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-72779\" class=\"wp-caption-text\">Monthly Service Based Billing<\/p><\/div>\n<p>If EC2 or S3 suddenly spikes, this view makes it obvious. It\u2019s basically our \u201csmoke alarm.\u201d<\/p>\n<h4>2. Usage-Based Cost Analysis for a Selected Service:<\/h4>\n<p>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.<\/p>\n<p><strong>Capabilities:<\/strong><\/p>\n<ul>\n<li>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.<\/li>\n<li>This was the game-changer. Instead of just saying \u201cEC2 is up,\u201d we could say \u201cOn-Demand usage hours doubled.\u201d<\/li>\n<\/ul>\n<div id=\"attachment_72780\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-72780\" decoding=\"async\" loading=\"lazy\" class=\"size-large wp-image-72780\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.38.34\u202fPM-1024x392.png\" alt=\"abc\" width=\"625\" height=\"239\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.38.34\u202fPM-1024x392.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.38.34\u202fPM-300x115.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.38.34\u202fPM-768x294.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.38.34\u202fPM-624x239.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.38.34\u202fPM.png 1328w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-72780\" class=\"wp-caption-text\">Usage Based Billing<\/p><\/div>\n<p><span style=\"color: #333333;\">This level of insight helps narrow down specific areas causing the increase in spend, offering better control over high-cost operations<\/span><\/p>\n<h4>3. Resource-Level Cost Analysis for Selected Usage Type<\/h4>\n<p>This is where the detective work gets easy. We pull in:<\/p>\n<ul>\n<li>Resource IDs.<\/li>\n<li>Tags (Account, Environment, Channel, Owner).<\/li>\n<li>Exact cost + usage numbers.<\/li>\n<\/ul>\n<div id=\"attachment_72781\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-72781\" decoding=\"async\" loading=\"lazy\" class=\"size-large wp-image-72781\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.42.18\u202fPM-1024x525.png\" alt=\"abc\" width=\"625\" height=\"320\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.42.18\u202fPM-1024x525.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.42.18\u202fPM-300x154.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.42.18\u202fPM-768x394.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.42.18\u202fPM-624x320.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.42.18\u202fPM.png 1338w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-72781\" class=\"wp-caption-text\">Resource Based Billing<\/p><\/div>\n<p>Without this, anomalies were fuzzy. With it, they\u2019re crystal clear.<\/p>\n<h3><strong>Pivot Table at the Account Level With AWS Tags<\/strong><\/h3>\n<p>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 &#8220;Bills&#8221; section of the AWS console.<\/p>\n<h3>The Reason for Developing the Account-Level Pivot Table<\/h3>\n<p>This pivot table was created to support projects that enable content owners to:<\/p>\n<ul>\n<li>Establish, plan, and automate news, FAST, and live video streaming channels.<\/li>\n<li>Distribute those channels among various endpoints and platforms.<\/li>\n<li>Learn about performance, cost-effectiveness, and channel-level content delivery.<\/li>\n<\/ul>\n<p>Because of this architecture, every channel frequently functions within the system as a separate client or unit. As a result, content owners must:<\/p>\n<ul>\n<li>Recognize the prices and savings offered by each channel.<\/li>\n<li>Attribute AWS usage accurately to individual accounts and channels.<\/li>\n<li>Make informed decisions around resource optimization and pricing strategy.<\/li>\n<\/ul>\n<p>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.<\/p>\n<div id=\"attachment_72782\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-72782\" decoding=\"async\" loading=\"lazy\" class=\"size-large wp-image-72782\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.43.43\u202fPM-1024x567.png\" alt=\"abc\" width=\"625\" height=\"346\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.43.43\u202fPM-1024x567.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.43.43\u202fPM-300x166.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.43.43\u202fPM-768x425.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.43.43\u202fPM-624x345.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/06\/Screenshot-2025-06-18-at-12.43.43\u202fPM.png 1474w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-72782\" class=\"wp-caption-text\">Account Level Table<\/p><\/div>\n<h3><strong>Tag-Based Identification<\/strong><\/h3>\n<p>The values for<strong> Account ID<\/strong>, <strong>Account Name<\/strong>, <strong>Channel ID<\/strong>, and <strong>Channel Name<\/strong> 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.<\/p>\n<h3>Attribution of Discounts<\/h3>\n<p>The table has distinct columns to show:<\/p>\n<ul style=\"list-style-type: square;\">\n<li>Usage-based cost<\/li>\n<li>Total effective cost<\/li>\n<li>Discounts applied, including:<\/li>\n<\/ul>\n<p>Enterprise Discount Program (EDP)<\/p>\n<p>Private Rate Card Discounts<\/p>\n<p>Bundled Discounts<\/p>\n<h3><strong>Value Proposition<\/strong><\/h3>\n<p>This structured and tag-enriched view helps clients understand:<\/p>\n<ul>\n<li>Which services are contributing to their AWS bills.<\/li>\n<li>What level of discount is being applied.<\/li>\n<li>How usage is distributed across their own internal account and channel identifiers.<\/li>\n<\/ul>\n<p>More transparent chargeback and showback reporting between organisational units is made possible by this format.<\/p>\n<h3><strong>Why Not Just Use AWS Cost Explorer?<\/strong><\/h3>\n<p>While AWS Cost Explorer provides a native interface for cost analysis, it comes with certain limitations:<\/p>\n<table style=\"height: 223px; width: 66.2616%; border-collapse: collapse; border-color: #000000; border-style: solid;\" border=\"1\" cellpadding=\"1\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 41.8408%; height: 24px;\"><strong>Feature<\/strong><\/td>\n<td style=\"width: 28.9048%; height: 24px;\"><strong> AWS Cost Explorer<\/strong><\/td>\n<td style=\"width: 242.19%; height: 24px;\"><strong> Custom Pivot Table View<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 41.8408%; height: 24px;\"><strong>Tag-based account\/channel mapping<\/strong><\/td>\n<td style=\"width: 28.9048%; height: 24px;\">Limited flexibility<\/td>\n<td style=\"width: 242.19%; height: 24px;\">Full customization via tags<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 41.8408%; height: 24px;\"><strong> Custom column hierarchy<\/strong><\/td>\n<td style=\"width: 28.9048%; height: 24px;\">Not supported<\/td>\n<td style=\"width: 242.19%; height: 24px;\">Fully configurable<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 41.8408%; height: 24px;\"><strong> Discounts breakdown<\/strong><\/td>\n<td style=\"width: 28.9048%; height: 24px;\">Aggregated view<\/td>\n<td style=\"width: 242.19%; height: 24px;\">Separated discount attribution<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 41.8408%; height: 24px;\"><strong>Offline export and manipulation<\/strong><\/td>\n<td style=\"width: 28.9048%; height: 24px;\">Manual CSV download<\/td>\n<td style=\"width: 242.19%; height: 24px;\">Structured data, easier automation<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 41.8408%; height: 24px;\"><strong> Resource-level traceability<\/strong><\/td>\n<td style=\"width: 28.9048%; height: 24px;\">Partially supported<\/td>\n<td style=\"width: 242.19%; height: 24px;\">Fully supported<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This pivot table approach is particularly beneficial when there is a need to provide cost visibility <strong>per client<\/strong>, <strong>per channel<\/strong>, or <strong>per project<\/strong>, in a way that aligns with internal organizational tagging strategies.<\/p>\n<h3><strong>Conclusion<\/strong><\/h3>\n<p>Switching from manual reviews to an automated, tag-driven QuickSight dashboard has been a game-changer for us.<\/p>\n<p>We\u2019re 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.<\/p>\n<p>If you\u2019re still leaning only on Cost Explorer and CSV exports, take it from me: it\u2019s worth building something better. Start small, keep tags clean, and let QuickSight + Athena do the heavy lifting.<\/p>\n<p>Because at the end of the day, it\u2019s not just about saving money. It\u2019s about clarity, accountability, and being able to answer the question we all hate: \u201cWhy did the AWS bill go up again?\u201d<\/p>\n<p>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\u00a0<a href=\"https:\/\/www.tothenew.com\/blog\/mastering-aws-cost-management-with-quicksight-a-comprehensive-workflow-from-data-export-to-dashboard-insights\/\" target=\"_blank\" rel=\"noopener\">Mastering AWS Cost Management with QuickSight<\/a> which provides a complete setup guide.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019ve ever tried to track AWS costs with just Cost Explorer and spreadsheets, you\u2019ll know the pain. On paper it sounds simple: export some data, make a pivot table, maybe throw a chart on top. In practice? You\u2019re stuck chasing down anomalies with five browser tabs open, three CSVs half-filtered, and a sinking feeling [&hellip;]<\/p>\n","protected":false},"author":2053,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":4},"categories":[2348],"tags":[7137,1892,7136],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/72783"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/2053"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=72783"}],"version-history":[{"count":8,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/72783\/revisions"}],"predecessor-version":[{"id":76134,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/72783\/revisions\/76134"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=72783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=72783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=72783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}