Bird
0
0

You want to store session data that expires exactly 30 minutes after creation using DynamoDB TTL. Which approach correctly sets the TTL attribute?

hard📝 Application Q15 of 15
AWS - DynamoDB
You want to store session data that expires exactly 30 minutes after creation using DynamoDB TTL. Which approach correctly sets the TTL attribute?
ASet TTL attribute to current Unix epoch time in seconds plus 1800 seconds
BSet TTL attribute to current time as ISO string plus 30 minutes
CSet TTL attribute to Boolean true when session expires
DSet TTL attribute to current Unix epoch time in milliseconds plus 1800000
Step-by-Step Solution
Solution:
  1. Step 1: Calculate TTL value correctly

    TTL attribute must be a Number in seconds, so add 1800 seconds (30 minutes) to current epoch seconds.
  2. Step 2: Eliminate incorrect formats

    ISO strings, Booleans, or milliseconds are invalid for TTL attribute in DynamoDB.
  3. Final Answer:

    Set TTL attribute to current Unix epoch time in seconds plus 1800 seconds -> Option A
  4. Quick Check:

    TTL = epoch seconds + 1800 [OK]
Quick Trick: TTL value = current epoch seconds + 1800 for 30 minutes [OK]
Common Mistakes:
MISTAKES
  • Using ISO date strings instead of epoch seconds
  • Using milliseconds instead of seconds
  • Setting TTL as Boolean instead of number

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes