Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Dynamodb works when TTL attribute is updated after already expired

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.

like image 545
SangminKim Avatar asked Oct 23 '25 13:10

SangminKim


1 Answers

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.

like image 167
jarmod Avatar answered Oct 26 '25 06:10

jarmod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!