Is there any way to get the timestamp for the most recent update on a DynamoDB table?
2 Answers
No. This is not part of the DynamoDB api. Fortunately this is easy to implement yourself. Add a column to each item for each UpdateItem or PutItem request with the current time. This will insert the time according to your application servers instead of DynamoDB itself, but these ideally will be the same
-
5But there is no guarantee that the clocks of all application servers will be in sync. Jan 27, 2015 at 17:23
-
6Of course not, synced clocks are a fundamental problem of distributed system design. Unfortunately, @Ajax did not speak more about his usecase so we cannot begin to guess the implications have in his system. I simply addressed his question as asked. Jan 28, 2015 at 20:44
-
1Not sure why this was downvoted. The answer is 100% true. The alternative offered isn't perfect, but it's the best you can do given the constraints of ddb.– scosmanJul 29, 2015 at 23:32
-
If you are just interested in an approximate time, you can get the timestamp of the write operations rounded to the nearest 5 minutes by looking at the SuccessfulRequestLatency
metric for the PutItem
operation inside Cloudwatch. You will see an entry on the x-axis only if there was a write operation in that 5-minutes time segment.
In the following screenshot, you can see that there was at least one write operation around 10:30 and 10:35, too: