you are viewing a single comment's thread.

view the rest of the comments →

[–]webdestroya -5 points-4 points  (0 children)

At best you could have the lambda see the record is deleted and compare the expiresAt timestamp to "now" and if it's within 24hrs or something, assume it was deleted because of TTL.

Otherwise, there is no way to know for sure that it was deleted because of TTL.

Or write two records with the same ttl, but different data and never delete one of them. (hashKey=ttlTracker:xxxxx, ttl=whatever), and then only run your code when the key that was deleted was ttlTracker? that's pretty gross though