Amazon DynamoDB

icon picker
DynamoDB Time To Live (TTL)

You can use Time To Live (TTL) to specify an attribute name whose value indicates the time of expiration for the item. This value is given as a number in seconds since the start of the Unix epoch. After that time, DynamoDB can delete the item without incurring write costs.
With global tables you configure TTL in one Region, and that setting is auto replicated to the other Region(s). When an item is deleted via a TTL rule, that work is performed without consuming Write Units on the source table - but the target table(s) will incur Replicated Write Unit costs.
Be aware that if the source and target tables have very low Provisioned write capacities, this may cause throttling, as the TTL deletions require write capacity.

Great for removing irrelevant or old data such as:
Session data.
Event logs.
Temporary data.
No extra cost and does not use WCU (Write capacity unit) / RCU (Read capacity unit).
TTL is a background task operated by DynamoDB.
A TTL helps reduce storage and manage the table size over time.
The TTL is enabled per row (you define a TTL column and add the expiry date / time there).
DynamoDB typically deletes expired items within 48 hours of expiration.
Deleted items are also deleted from the LSI / GSI.
DynamoDB streams can help recover expired items.
image.png
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.