In AWS DynamoDB, when you enable TTL on a table, what happens to items after their TTL timestamp passes?
Think about how AWS handles background cleanup for expired items.
DynamoDB TTL marks items for expiration and deletes them asynchronously, usually within 48 hours after the TTL timestamp passes. Items are not deleted immediately.
When configuring TTL on a DynamoDB table, which attribute type must the TTL attribute have?
TTL expects a timestamp in a numeric format.
The TTL attribute must be a Number type containing the Unix epoch time in seconds when the item should expire.
To enable TTL on a DynamoDB table using AWS IAM, which permission must be granted?
Check the exact IAM action name for TTL updates.
The correct IAM permission to enable or disable TTL on a DynamoDB table is dynamodb:UpdateTimeToLive.
Consider a DynamoDB table with TTL enabled. How does TTL affect read capacity units (RCUs) and storage costs over time?
Think about when items are actually removed and how reads behave before deletion.
TTL deletes expired items asynchronously, reducing storage costs once deleted. However, until deletion, expired items still consume read capacity when accessed.
You want to extend the life of an item in a DynamoDB table with TTL enabled by updating its expiration time. What is the best practice to update the TTL attribute?
Consider how to safely change the expiration time without losing the item.
The recommended way to renew TTL is to update the TTL attribute with a new future timestamp atomically. Deleting or nullifying the attribute is unnecessary and can cause data loss or unintended expiration.