Question:
According to the docs:
DynamoDB typically deletes expired items within 48 hours of expiration. The exact duration within which an item truly gets deleted after expiration is specific to the nature of the workload and the size of the table
Is there any way we can estimate how long it would take for an expired item to be removed in certain table? I was hoping to implement sort of a scheduler based on a DynamoDB table with TTL and a Lambda function processing DynamoDB Streams, but I would need deletions to take effect not later than one hour after an item is expired. Would this be possible if the table is not large (less than 1.000 items)?
Answer:
The exact timing of deletions is not something you should take a hard dependency upon. As DynamoDB TTL uses background I/O capacity to process the deletions (which saves the customer money and preserves their provisioned IOPS to be available for their application), this will depend on what else is going on in the system, which can vary.