Error: DynamoDB TTL Not Working

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.
- Store Math.floor(Date.now() / 1000) plus the desired lifetime in seconds, not Date.now() milliseconds or an ISO date string.
- Check for missing attributes, the wrong type, a future value, or a timestamp more than five years in the past.
- Reconfigure TTL on restored tables. Verify that you are not using an MRSC global table, where TTL is unsupported.
- 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.
Other Common DynamoDB Errors (with Solutions)
- DynamoDB Scan Not Working
- dynamodb index not found
- error retrieving dynamodb table item serializationexception
- dynamodb cannot read properties of undefined
- DynamoDB Mapper Could Not Instantiate Class
- DynamoDB ConditionalCheckFailedException
- dynamodb condition does not exist
- DynamoDB Is Not Null
- DynamoDB local error unable to access JAR file dynamodblocal.jar
- Float types are not supported. Use decimal types instead.
- DynamoDB Item Does Not Exist
- DynamoDB missing items
- DynamoDB cannot do operations on a non-existent table
- dynamodb cannot read property 's' of undefined
- DynamoDB parameter validation failed
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
- SSH GUI Client
- Chat With Cloud
- MongoDB GUI Client
- AWS Cost Monitoring
- DynamoDB Query Builder
- DynamoDB Code Examples
- DynamoDB Node.js Queries
- DynamoDB JSON Converter
- DynamoDB UUID Generator
- DynamoDB Local Admin GUI
- DynamoDB Pricing Calculator
- DynamoDB Single-Table Design
- Best DynamoDB GUI Clients
- Dynobase vs DynoTable
DynamoDB Info
© 2026 Dynobase