From the course: AWS Certified Developer - Associate (DVA-C02) Cert Prep

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Amazon DynamoDB Time to Live (TTL)

Amazon DynamoDB Time to Live (TTL)

- [Instructor] Now let's talk about a DynamoDB feature called TTL, or Time-To-Live. Time-To-Live allows you to automatically expire an item based on a defined timestamp. To set a TTL timestamp, first you have to enable TTL via the DynamoDB console or using the update Time-To-Live API. When you enable TTL, you get to assign the name of the TTL attribute that DynamoDB will look for in determining if an item is eligible for expiration. The name of the detail attribute is arbitrary. You can name it whatever you want, but it should be the same for all items that you want to expire at a certain period in time because you can only configure one TTL attribute per table. When adding a TTL attribute to an item, it should be of a number data type and its volume must be in Unix Epoch time format. Take note that TTL comes free of charge. You won't get billed every time an item is deleted and it doesn't consume any write capacity. So…

Contents