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)?
Amazon DynamoDB Time to Live (TTL) allows you to define a per-item timestamp to determine when an item is no longer needed. Shortly after the date and time of the specified timestamp, DynamoDB deletes the item from your table without consuming any write throughput.
What is DynamoDB TTL? DynamoDB allows you to specify a time-to-live timestamp attribute in an epoch timestamp format to define when the item is no longer needed. This attribute will tell DynamoDB to remove items whose TTL attribute is later than current time.
TTL typically deletes expired items within 48 hours of expiration.
The data is eventually consistent across all storage locations, usually within one second or less. DynamoDB supports eventually consistent and strongly consistent reads. When you read data from a DynamoDB table, the response might not reflect the results of a recently completed write operation.
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.
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