DynamoDB (TTL)
One of the features of DynamoDB is its ability to automatically delete or discard data from a table that you may no longer need. This feature is called TTL. In DynamoDB, you can set a per-item timestamp, which serves as a criterion for determining when an item becomes obsolete. Following the specified timestamp’s date and time, DynamoDB automatically removes the item from your table, all without utilizing any write throughput. DynamoDB stores table items on hot SSDs and charges a per-GB monthly price on storage based on the amount of data stored in a table. Since TTL-induced deletes are not charged, this makes TTL a free-of-cost automatic function to delete items from your tables that may have lost relevance over time and allow you to manage the storage size – and, thus, costs – for your DynamoDB tables.
Common use cases for using TTL
Before getting into how the feature works and the key considerations for using TTL, let’s look at some...