I am new to DynamoDB and trying to model/index a single table design for tracking a single number value, but with separate update entries for each time the number is changed. Every time the number value is updated, an update entry should be saved to the table (as its own item, not as a property on a single "tracked number" item), and of course the tracked number value should be updated too. I want to be able to query and sort the update entries by date and number change value. And of course I want to be able to look up the current number value.
What is a good single table design for this data and access pattern? I have tried a couple different ways, but find myself blocked because either unable to get/write to a global secondary index, or always returning the item with the current number value when attempting to query on just the update entries themselves. I could very easily create a separate tables for the tracked number and number updates, but that seems to go against DynamoDB principles.