Error: error updating dynamodb table time to live

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
An error updating DynamoDB TTL usually concerns the table-level TTL configuration, not an individual item’s expiry value. Inspect DescribeTimeToLive first. Repeated updates or requests during ENABLING or DISABLING can fail; do not blindly repeat UpdateTimeToLive.
import boto3
db = boto3.client("dynamodb", region_name="us-west-2")
state = db.describe_time_to_live(TableName="Orders")["TimeToLiveDescription"]
print(state)
if state["TimeToLiveStatus"] == "DISABLED":
db.update_time_to_live(
TableName="Orders",
TimeToLiveSpecification={"Enabled": True, "AttributeName": "expiresAt"},
)The parameter is AttributeName, not Attribute_name. Treat an already enabled matching configuration as success. To change the TTL attribute name, disable TTL, wait for the disabled state and permitted update interval, then enable the new name. AWS documents enable/disable changes once per table per hour.
Check dynamodb:UpdateTimeToLive permission, the target Region, and the table state. MRSC global tables do not support TTL. If configuration succeeds but items remain, verify the case-sensitive attribute name and Number values in Unix epoch seconds. Deletion normally occurs within a few days rather than immediately.
Other Common DynamoDB Errors (with Solutions)
- dynamodb unable to locate property for key attribute
- DynamoDB stream lambda error
- AWS DynamoDB errors ResourceNotFoundException
- dynamodb throughput error
- DynamoDB ValidationException: Query condition missed key schema element
- error dynamodb streams must be enabled on the table
- One or more parameter values were invalid: some AttributeDefinitions are not used
- dynamodb stream missing fields
- dynamodb-admin not working
- com amazonaws services dynamodbv2 model resourcenotfoundexception
- DynamoDB GetItem no item
- DynamoDB scan does not return all items
- DynamoDB stream no records processed
- dynamodb number_value cannot be converted to string
- dynamodb 1 validation error detected value
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today