Expiring Items By Using DynamoDB Time to Live (TTL) - Amazon DynamoDB
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

Expiring Items By Using DynamoDB Time to Live (TTL)

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. TTL is provided at no extra cost as a means to reduce stored data volumes by retaining only the items that remain current for your workload’s needs.

TTL is useful if you store items that lose relevance after a specific time. The following are example TTL use cases:

  • Remove user or sensor data after one year of inactivity in an application.

  • Archive expired items to an Amazon S3 data lake via Amazon DynamoDB Streams and AWS Lambda.

  • Retain sensitive data for a certain amount of time according to contractual or regulatory obligations.

For more information about TTL, see these topics: