Amazon CloudWatch Contributor Insights for Amazon DynamoDB is a diagnostic tool for identifying the most frequently accessed and throttled keys in your table or index at a glance. This tool uses CloudWatch Contributor Insights. By enabling CloudWatch Contributor Insights for DynamoDB on a table or global secondary index, you can view the most accessed and throttled items in those resources.
Execute the following commands to enable Contributor Insights on the DynamoDB table.
DDB_CONTRIB=$(aws ssm get-parameter --name '/petstore/dynamodbtablename' | jq .Parameter.Value -r) aws dynamodb update-contributor-insights --table-name $DDB_CONTRIB --contributor-insights-action ENABLE
Wait for a few minutes and navigate to CloudWatch Contributor Insights and you should screen that is similar to the one below.
This report shows a Top ‘N’ report based on Partition Keys in the DynamoDB table.
Here is another Top ‘N’ report based on a combination of Partition and Sort Key values