How do I set up Time to Live (TTL) in DynamoDB?
Last updated: 2019-04-22
How can I enable Time to Live (TTL) on my Amazon DynamoDB table?
Resolution
To set up TTL, see Enabling Time to Live. Keep the following in mind:
- TTL attributes must use the Number data type. Other data types, such as String, aren't supported.
- TTL attributes must use the epoch time format. For example, the epoch timestamp for October 28, 2019 13:12:03 UTC is 1572268323. You can use a free online converter, such as EpochConverter, to get the correct value.
Note: Be sure that the timestamp is in seconds, not milliseconds (for example, use 1572268323 instead of 1572268323000).
Related Information
Did this article help you?
Anything we could improve?
Need more help?