dynobase-icon
Dynobase

Error: error updating dynamodb table time to live

Rafal Wilinski

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.

See TTL rules and troubleshooting and AWS documentation.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
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.