Shared Database (RDS, Aurora, Cosmos DB, etc.)
🏢 Enterprise · ☁️ MSP
- The Challenge
A large shared database instance or cluster serves multiple business units, departments, or customers with very different query patterns and load - but the bill shows one number for the whole database, with no way to tell which unit is actually driving compute, I/O, or storage cost.
- The Solution
Bring in per-unit database activity (query volume, IOPS, data transfer, or storage footprint) as telemetry, then allocate the database's cost by whichever measure best reflects what's actually driving spend - compute-bound workloads by query volume, I/O-bound workloads by IOPS, storage-heavy units by GB stored.
- Dataset Needed
| Field | Type | Example | Purpose |
|---|---|---|---|
timestamp | Dimension | 2026-05-27T15:04:05Z | Aligns usage with billing period |
business_unit / customer_id | Dimension | Finance, Customer ID | The unit the cost will be broken out by |
query_count | Measure | 1,240,000 | Query volume per unit |
iops | Measure | 8,500 | Read/write operations per unit |
data_transfer_gb | Measure | 320 | GB read/written per unit |
storage_gb | Measure | 1,450 | Storage footprint per unit |
📘 You don't need every measure - pick the one(s) that match what's actually driving your database bill. Cost comes from your existing billing export; this dataset only supplies the usage side
-
KPIs to Build
KPI Formula What it represents Cost per 1M Queries Amortized Cost ÷ query_count × 1,000,000Compute-driven cost efficiency per unit Cost per IOPS Amortized Cost ÷ iopsI/O-driven cost share - useful for provisioned-throughput billing Cost per GB Stored Amortized Cost ÷ storage_gbStorage-specific cost per unit
- Business Mapping to Create
Type Value Purpose Type Telemetry-Based Group By- Rule → Condition Condition Service Is Amazon RDS(or your DB service)The cost slice to allocate Pipeline pipline_nameWhere the usage data lives Custom Dimension (Group By) business_unitThe field the cost will be broken out by Allocation Metric query_count(oriops,data_transfer_gb,storage_gb)The measure that determines each unit's share - swap depending on dominant cost driver, or build separate mappings for compute vs. storage Time Granularity Daily Matches the billing period granularity Include Unmatched Costs On Costs with no matching usage go to a "Not Allocated" bucket instead of being dropped Mapping Name Cost per Customer Becomes the group-by option in Cost & Usage Explorer
-
How to Display It in the UI
Build these as saved views in Cost & Usage Explorer, then pin them to a dashboard:
View Group By / Measure What it shows DB Cost per Unit — Trend Group By → Business Mapping; chart over time Stacked chart by business unit over time Top Consumers by Query Volume / IOPS Same mapping, sorted descending, table view Flags heaviest units Storage Growth per Unit Trend view isolating storage_gbIsolates storage-cost drivers Drill-Down Any unit → Next Drill by Instance/Region Ad hoc investigation into a unit's cost spike
