Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Dynamo Write Capacity Graphs don't agree

I can see two graphs for write capacity: one thru CloudWatch alarms and the other thru the DynamoDB console. Here is what CloudWatch shows me:

enter image description here

Looks like the write capacity spikes up to almost 8,000 write capacity units.

Then I go to the Dynamo console and this is what I see:

enter image description here

Not even close to that high and not over the capacity allocated.

Why don't these two agree? Why does the CloudWatch alarm go off?

like image 214
Scott Decker Avatar asked Dec 08 '25 19:12

Scott Decker


1 Answers

Inspecting the network requests sent from the DynamoDB console to CloudWatch revealed that the metrics in the graph are:

  • Average(ProvisionedReadCapacityUnits)
  • Sum(ConsumedReadCapacityUnits)

But as @Shiplu Mokaddim has noticed in a comment on the other answer, plotting those two in CloudWatch does not result in a graph matching what you see in the DynamoDB console.

It turns out, that the DynamoDB console uses the Sum(ConsumedReadCapacityUnits) to compute an average to show in the graph. This is done by dividing the values with the period in seconds, and it ca be replicated in the CloudWatch console using a math expression.


DynamoDB console

DynamoDB console


CloudWatch console

CloudWatch console


Bonus: after realizing how to pull these numbers, I was able to write a script that produces a list of provisioned and consumed capacity for all DynamoDB tables in my AWS account.

like image 160
Jørn Schou-Rode Avatar answered Dec 10 '25 14:12

Jørn Schou-Rode