DynamoDB TTL does not delete an item at its timestamp. That timestamp makes the item eligible for asynchronous, best-effort deletion; until DynamoDB removes it, the item can still appear in reads, queries, and scans. If your application must stop serving expired records immediately, enforce expiration in your read and write logic rather than relying on TTL cleanup.
Why expired DynamoDB items are still showing up
TTL is background cleanup, not a read-time visibility rule. An item whose expiration time has passed may remain in the table while DynamoDB processes eligible deletions. AWS says deletion typically happens within a few days in its TTL guide; the UpdateTimeToLive API reference says typically within two days and notes that timing depends on workload. Neither is a deadline or guarantee. AWS describes deletion as best effort to preserve throughput for other data operations.
As an Amazon Associate I earn from qualifying purchases.
Until physical deletion, an expired item can still be returned by a GetItem, Query, or Scan unless your application excludes it. It also continues to count toward storage and read costs until deleted, as AWS notes in its expired-items guidance.
Diagnose TTL in this order
- Confirm TTL is enabled on the table you are actually querying. Enabling TTL can take approximately one hour to process across all partitions. Check the table’s TTL configuration in the AWS console or with your normal table-configuration tooling. See AWS’s TTL enablement guide.
- Match the attribute name exactly. The configured TTL attribute name is case sensitive. If the table is configured for
expiresAtbut an item storesExpiresAt, TTL will not use that differently cased field. - Inspect the stored type and unit. The TTL field must be a DynamoDB Number containing a Unix epoch timestamp in seconds. A String or a millisecond timestamp is not the specified format. Also, items with a TTL timestamp more than five years in the past are not eligible for deletion. Details are in AWS’s TTL computation guidance.
- Check whether the read path filters expiration. Even a correctly configured, expired item can remain visible while deletion is pending. For Query and Scan results, compare the TTL value with current epoch seconds and keep only items whose expiration is still in the future. AWS demonstrates this approach in its expired-items guide.
- Review writes to expired-but-present items. If an expired record must not be updated or recreated through a write path, use a condition expression that encodes your application’s expiration rule. TTL deletion alone does not prevent a write from touching an item that has not yet been physically removed.
Hide expired items now; let TTL clean them up later
These are separate responsibilities. A read-time expiration check controls what your application returns as soon as the timestamp passes. A conditional write controls whether an expired-but-still-present item can be modified. TTL eventually removes eligible data from the table, but does not promise exact-time deletion.
#1 Best Overall
For Query or Scan, use a filter expression that compares the numeric TTL attribute to current epoch seconds, retaining records with a value greater than now. If the application uses other read patterns, apply the equivalent check before returning an item. Keep the filter aligned with the same expiration rule used by write conditions; otherwise an item can be hidden on reads yet still be changed by a separate write path.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What to expect from Streams and Global Tables
If DynamoDB Streams is enabled, a TTL removal appears as a service deletion. In the Region where deletion occurs, AWS documents the stream record identity as userIdentity.type = Service and userIdentity.principalId = dynamodb.amazonaws.com. For a replicated deletion in another Global Tables Region, that identity marker is not set. Consumers that archive or react to TTL deletions should account for the regional difference, described in the Streams and TTL guide.
Rank #2
For Global Tables version 2019.11.21, AWS documents TTL deletions as replicating to all replica tables. The initial delete does not consume write capacity in the Region where expiry is processed; replicated deletes consume replicated write capacity or replicated write units in replica Regions, and applicable charges can apply. Check the current billing mode and AWS pricing for a cost estimate; the behavior is explained in the TTL guide.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Quick Recap
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




