Skip to content

DynamoDB Commands

Analyze DynamoDB tables for provisioned capacity and estimated monthly cost, surfacing over-provisioned and idle tables.

Commands

dynamodb cost-analysis

Analyse DynamoDB tables for capacity usage and estimated monthly cost.

aws-cloud-utilities dynamodb cost-analysis [OPTIONS]
Option Value Description
--region TEXT Single region to scan (default: all regions).
--all-regions flag Scan all regions (default behavior).
--top INTEGER Number of top-expensive tables to show. (default: 10)
--output-file TEXT Save results to file (.json/.yaml/.csv).

Examples

# Every region
aws-cloud-utilities dynamodb cost-analysis

# One region
aws-cloud-utilities dynamodb cost-analysis --region us-east-1

# Top 5 most expensive tables, saved as JSON
aws-cloud-utilities dynamodb cost-analysis --top 5 --output-file dynamodb-cost.json

How cost is estimated

For provisioned-throughput tables:

(ReadCapacityUnits + WriteCapacityUnits) * $0.0072 * 24 * 30

This uses us-west-2 provisioned pricing. On-demand (PAY_PER_REQUEST) tables are listed but shown as On-Demand; their cost is usage-based and cannot be derived from table metadata, so they are excluded from the provisioned-cost totals.

What it reports

  • Per table: region, billing mode, RCU/WCU, item count, size, and estimated monthly cost, sorted by cost
  • Total provisioned RCU/WCU and estimated monthly cost
  • The top-N most expensive tables
  • "Empty but expensive" tables - zero items but a meaningful provisioned cost
  • Cost totals grouped by project prefix, taken from the table name before the first -