Challenge - 5 Problems
TTL Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:00remaining
Understanding TTL attribute purpose
What is the main purpose of setting a TTL (Time To Live) attribute on a DynamoDB table item?
Attempts:
2 left
💡 Hint
Think about why you would want items to disappear automatically.
✗ Incorrect
TTL attribute marks items with an expiration timestamp. DynamoDB automatically deletes expired items to save storage and cost.
❓ query_result
intermediate1:00remaining
TTL attribute data type and value
Which of the following is the correct data type and value format for a TTL attribute in DynamoDB?
Attempts:
2 left
💡 Hint
TTL uses a timestamp in seconds since 1970-01-01.
✗ Incorrect
DynamoDB TTL expects a number representing the Unix epoch time in seconds for expiration.
📝 Syntax
advanced1:30remaining
Enabling TTL on a DynamoDB table
Which AWS CLI command correctly enables TTL on a DynamoDB table with the TTL attribute named 'expireAt'?
Attempts:
2 left
💡 Hint
Check the official AWS CLI command syntax for TTL update.
✗ Incorrect
The correct command uses update-time-to-live with a JSON-like specification for enabling TTL and specifying the attribute name.
❓ optimization
advanced1:30remaining
Optimizing TTL attribute usage
To optimize the TTL feature and avoid unexpected data retention, which practice is recommended when setting the TTL attribute value?
Attempts:
2 left
💡 Hint
TTL deletion is not immediate; allow some buffer time.
✗ Incorrect
Setting TTL slightly in the future ensures DynamoDB processes the expiration properly without premature deletion.
🔧 Debug
expert2:00remaining
Troubleshooting TTL not deleting expired items
You enabled TTL on your DynamoDB table with attribute 'expireAt', but expired items are not being deleted after several days. What is the most likely cause?
Attempts:
2 left
💡 Hint
TTL attribute must be a number, not a string.
✗ Incorrect
If TTL attribute values are strings, DynamoDB cannot interpret expiration times, so items won't be deleted.