dynobase-icon
Dynobase

Error: DynamoDB TTL Not Working

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

DynamoDB TTL requires an enabled table setting and a numeric Unix timestamp in seconds on each expiring item. Deletion is asynchronous, typically within a few days, so an expired record remaining visible is not necessarily a configuration failure.

aws dynamodb describe-time-to-live --table-name Sessions
aws dynamodb update-time-to-live --table-name Sessions \
  --time-to-live-specification 'Enabled=true,AttributeName=expiresAt'

Run the update only when the setting needs enabling. Check the status first rather than repeatedly calling it while a change is in progress. The stored attribute must be exactly expiresAt, including case.

  1. Store Math.floor(Date.now() / 1000) plus the desired lifetime in seconds, not Date.now() milliseconds or an ISO date string.
  2. Check for missing attributes, the wrong type, a future value, or a timestamp more than five years in the past.
  3. Reconfigure TTL on restored tables. Verify that you are not using an MRSC global table, where TTL is unsupported.
  4. Filter out expired records when reading and enforce expiration in authorization or business logic. TTL cleanup is not a precise scheduler.

Inspect CloudWatch TimeToLiveDeletedItemCount to distinguish delayed cleanup from no activity. Use the TTL converter and setup guide to inspect timestamp units.

See timestamp handling and AWS documentation.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Changelog
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2026 Dynobase
+
Still using AWS DynamoDB Console?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.