You have a DynamoDB table storing user sessions with a TTL attribute set to expire sessions after 30 minutes. Which of the following describes the expected behavior of expired session items?
Think about how DynamoDB handles TTL deletions asynchronously.
DynamoDB TTL deletes expired items asynchronously and not immediately after expiration time. This means expired items may remain visible for some time before deletion.
You want to store application logs in DynamoDB and automatically remove logs older than 7 days. What is the best way to implement this using TTL?
TTL works by specifying an expiration timestamp on each item.
Setting a TTL attribute with a timestamp 7 days after creation allows DynamoDB to automatically delete logs after 7 days without manual intervention.
Which of the following DynamoDB item attributes correctly sets TTL for cache expiration?
{
"CacheKey": "item123",
"Data": "some cached data",
"ExpiresAt": ?
}TTL attribute must be a Unix epoch time in seconds.
DynamoDB TTL expects the attribute to be a number representing Unix epoch time in seconds when the item expires.
You have a high volume of log entries written to DynamoDB with TTL set to 30 days. What is the best practice to optimize table performance and cost?
Think about how partitioning affects performance and TTL cleanup.
Partitioning logs by month into separate tables with TTL reduces the size of each table and improves performance and cost efficiency.
You set TTL on cache items with an attribute named "expiryTime" as Unix epoch seconds. After several days, expired items still appear in the table. What is the most likely cause?
Check the TTL attribute name configured in the table settings.
DynamoDB TTL requires the attribute name configured in the table TTL settings to exactly match the attribute in items. A mismatch means TTL does not work.