Auto populate timestamp in DynamoDB

前端 未结 2 1651
北恋
北恋 2021-01-11 17:16

I come from Relational Database background and we have a way to populate timestamp for row creation and update. I am having difficulty finding similar feature for DynamoDB.

2条回答
  •  -上瘾入骨i
    2021-01-11 17:59

    There is no such functionality like DEFAULT CURRENT TIMESTAMP or UPDATE CURRENT_TIMESTAMP. You will have to set the date by yourself.

    However if you want to keep track of changes on updates then you can use something like atomic counters.

    Thus on every update your will increment the counter value.

提交回复
热议问题