Ravi Sir's Cards › AWS
DynamoDB TTL vs DeleteItem
DynamoDB deletes expired items asynchronously, usually within a few days. Enable TTL on a numeric Unix seconds attribute. Your application removes an item by full primary key. Use a condition when another writer could have changed or renewed it. Reject a 15-minute token at expiry even if its table item is still present. TTL is later cleanup.
Read card text
What this card says
TTL
DynamoDB deletes expired items asynchronously, usually within a few days. Enable TTL on a numeric Unix seconds attribute.
DeleteItem
Your application removes an item by full primary key. Use a condition when another writer could have changed or renewed it.
Example
Reject a 15-minute token at expiry even if its table item is still present. TTL is later cleanup.