I read this document How It Works: DynamoDB Time to Live (TTL).
It is saying that an item which is already expired could still exist as marked it is expired.
In this case, I wonder if I update the TTL attribute to a future time, Dynamodb recognize the update and delay deleting the item to the new TTL or It just delete it with origin TTL?
Items that are past their expiration, but have not yet been deleted can still be updated, and successful updates to change or remove the expiration attribute will be honored.
Actually the above document mentions the case but I am not sure what it means exactly.
Yes, it will delay the expiration.
The key statement, as you pointed out, is at How It Works: DynamoDB Time to Live (TTL):
Items that are past their expiration, but have not yet been deleted can still be updated, and successful updates to change or remove the expiration attribute will be honored.
So, if you modify the expiration attribute after an item has been queued for expiration but before it has actually been deleted, then the change to the expiration attribute will be honored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With