Replace <ddb-metrics-table> with the name of your table (in 2 places) and tweak the start and end time
aws cloudwatch get-metric-data --start-time 2023-10-01T00:00:00Z --end-time 2023-11-01T00:00:00Z --metric-data-queries '[
{
"Id": "m1",
"MetricStat": {
"Metric": {
"Namespace": "AWS/DynamoDB",
"MetricName": "ConsumedWriteCapacityUnits",
"Dimensions": [