Kieran Hunt

DynamoDB's TTL Latency

✦ 2024-11-30

2024-12-06: I posted this to Reddit and it garnered some good discussion. I’ve also written up an in-depth post taking a look at how I produced that graph.

DynamoDB’s Time To Live (TTL) feature will automatically delete items once their TTL timestamp is in the past. It’s useful to automatically clean up items without having to explicitly go in and make a DeleteItem call.

However, DDB’s documentation is quite vauge about how long after an item’s expiry it’ll actually perform the deletion:

Items with valid, expired TTL attributes may be deleted by the system at any time, typically within a few days of their expiration. Using time to live (TTL) in DynamoDB - Amazon DynamoDB

To actually put a number on it, I strung together a few AWS services in us-east-1 and measured that latency. The results are plotted in that graph below, updated about once a minute. Times are UTC.

TTL Graph