Does DynamoDB support TTL?

Yes. DynamoDB supports Time to Live (TTL). You designate a Number attribute holding a Unix epoch expiry timestamp in seconds; DynamoDB automatically deletes items shortly after they expire (typically within a few days), at no extra cost and without consuming write capacity. Expired-but-not-yet-deleted items can still appear in reads until removed.

How to enable it

Turn on TTL for the table and name the attribute that holds the expiry. That attribute must be a Number storing a Unix epoch timestamp in seconds (not milliseconds). Items whose value is in the past become eligible for deletion.

What to expect

  • Free — the automatic delete does not consume write capacity units.
  • Not instant — DynamoDB typically removes expired items within a couple of days of expiry.
  • Still readable — until they are physically deleted, expired items can appear in reads, queries, and scans, so filter them out if exactness matters.

Common uses

Sessions, verification tokens, caches, and other ephemeral data that should self-clean. Pair with DynamoDB Streams to react to deletions.

Go deeper

Read the DynamoDB TTL guide and DynamoDB Streams. Download DynoTable to view and set TTL attributes.

Console 없이 DynamoDB 작업하기

DynoTable은 DynamoDB를 위한 빠른 데스크톱 클라이언트입니다 — 테이블을 탐색하고, SQL 스타일 쿼리를 실행하고, 항목을 로컬에서 편집하세요.