Im am trying to find if it is even possible to create a cloudwatch metric for a dynamoDB table that is grouped by the partitionkey of said table. For example, showing the number of writes to the table grouped by PartitionKey over the last 24 hours, or even just total count by partition key.
I imagine you are trying to understand the traffic in your partitions, You can enable Amazon CloudWatch Contributor Insights to provide information about the most accessed and throttled items in a table or global secondary index.
Once you enable it you can create graphics with this detailed information to perform the analysis you want. (Here is the link from the official documentation). You will have 4 rules created in CloudWatch:
If your table has partition key only:
IF your table has partition and sort key:
You can enable it in the console as the picture below indicates.