Skip to content

Commit e36ff6c

Browse files
author
Alexander Wiechert
committed
add athena setuo + queries
1 parent fd1874c commit e36ff6c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ This module is compatible with both Terraform (>=1.4) and OpenTofu (>=1.4).
2828
- Send alerts to SNS with configurable email subscription.
2929
- Adds CloudWatch Composite Alarms to combine ReadOps, WriteOps, and BurstBalance alerts per EBS volume.
3030
- **Optional CloudWatch dashboard** with dynamic widgets per volume.
31+
- Creates Athena Named Queries for EBS cost and usage analysis (requires CUR + Glue + Athena setup).
3132
- Includes example project and CI workflow with security checks.
32-
3333
---
3434

3535
## Usage
@@ -134,7 +134,26 @@ The following tags are applied:
134134
| filtered_volume_ids | List of monitored EBS volume IDs |
135135

136136
---
137+
## Athena Named Queries
138+
139+
This module automatically creates useful Athena Named Queries for analyzing EBS costs and usage from the AWS Cost and Usage Report (CUR). These queries help FinOps teams, engineers, and analysts quickly identify optimization opportunities.
140+
141+
The following queries are included:
142+
143+
| Query Name | Description |
144+
|------------------------|-----------------------------------------------------------|
145+
| `ebs_cost_by_volumetype` | Summarizes EBS costs by volume type (`gp2`, `gp3`, etc.) |
146+
| `ebs_cost_by_volume` | Shows the top 20 most expensive EBS volumes |
147+
| `ebs_monthly_trend` | Displays monthly cost trends over time |
148+
| `ebs_cost_by_usagetype` | Breaks down costs by usage type (e.g., volumes, snapshots) |
149+
| `ebs_cost_by_costcenter` | Aggregates costs by CostCenter tag (if CUR tagging is enabled) |
137150

151+
These Named Queries appear in the **AWS Athena console** under Saved Queries and can be executed directly or integrated into reporting and dashboard tools.
152+
153+
### Using Athena Named Queries
154+
After deployment, go to the AWS Athena console → Saved Queries → select and run the EBS cost analysis queries.
155+
156+
---
138157
## Requirements
139158

140159
- Terraform ≥ 1.4

0 commit comments

Comments
 (0)