Detailed Cost Analysis with AWS Cost and Usage Report - Athena Queries and Visualization Pipelines
Analyze resource-level detailed cost data with SQL in Athena and visualize it with QuickSight. This article covers CUR 2.0 data exports and how to build an analytics foundation.
Overview of CUR
The Cost and Usage Report (CUR) provides the most granular cost data available in AWS. While Cost Explorer offers an aggregated view, CUR delivers line-item data down to the resource ID level, delivered to S3. You can analyze costs for each individual EC2 instance, S3 bucket, and Lambda function separately.
Athena Queries and Visualization
By delivering CUR in Parquet format to S3 and creating tables with a Glue Crawler, you can run SQL queries in Athena. Queries such as "top 10 most expensive EC2 instances last month," "total cost of untagged resources," and "effective discount rate of Savings Plans" enable detailed analysis that goes beyond what Cost Explorer can provide. Build dashboards in QuickSight using Athena as a data source to automatically share cost reports broken down by team or project.
CUR 2.0 and Data Exports
CUR 2.0 (Data Exports) evolves the traditional CUR by offering Parquet output, column selection, and SQL-based filtering. By exporting only the columns you need, you can reduce both S3 storage volume and Athena scan costs. Use resource-level line items to identify costs for individual EC2 instances and S3 buckets, and track costs for untagged resources. Analyze Savings Plans and RI utilization (coverage, utilization rate, effective pricing) from CUR columns to optimize purchasing options. When you output CUR from an Organizations consolidated billing account, you can analyze costs for all member accounts in a single report. For a systematic study of CUR from basics to advanced topics, check out books on Amazon.
Building a CUR Analytics Foundation
Deliver CUR to S3 in Parquet format and create tables with a Glue Crawler to run SQL queries in Athena. Build dashboards in QuickSight to visualize cost trends by service, cost allocation by tag, and Savings Plans coverage. In large-scale environments, CUR data can reach several GB per month, so use S3 lifecycle rules to transition older reports to Glacier. Optimize Athena query costs with Parquet format and partitioning (year/month) to avoid full scans. CUDOS (Cost and Usage Dashboards Operations Solution) is a QuickSight dashboard template provided by AWS that lets you rapidly build a CUR analytics foundation.
CUR Pricing
Generating CUR and delivering it to S3 is free. Costs are incurred for S3 storage and Athena query charges. CUR data volume scales with the number of resources in your account, ranging from several GB to tens of GB per month in large environments. Athena queries cost approximately $5.00 per TB scanned, and Parquet format with columnar partitioning can significantly reduce scan volume. QuickSight SPICE storage includes 10 GB per Author, with additional storage at approximately $0.25 per GB per month.
Summary
CUR is a report that provides resource-level detailed cost data. Use CUR 2.0's column selection and SQL filtering to efficiently export data, then run SQL queries in Athena. Build custom dashboards in QuickSight to achieve advanced cost analysis including Savings Plans coverage and RI utilization.