0
0
DynamoDBquery~10 mins

TTL behavior and timing in DynamoDB - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the TTL attribute name in DynamoDB.

DynamoDB
ttl_spec = {"AttributeName": "[1]", "Enabled": true}
Drag options to blanks, or click blank then click option'
AExpirationTime
BTTL
CTimeToLive
DDeleteAt
Attempts:
3 left
💡 Hint
Common Mistakes
Using attribute names not recognized by DynamoDB for TTL.
Forgetting to enable TTL after setting the attribute name.
2fill in blank
medium

Complete the code to enable TTL on a DynamoDB table using AWS CLI.

DynamoDB
aws dynamodb update-time-to-live --table-name MyTable --time-to-live-specification Enabled=[1],AttributeName=TTL
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
Cenabled
Dyes
Attempts:
3 left
💡 Hint
Common Mistakes
Using string values like 'yes' or 'enabled' instead of boolean true.
Setting Enabled to false disables TTL.
3fill in blank
hard

Fix the error in the TTL attribute value type for DynamoDB items.

DynamoDB
item = {"UserId": "123", "TTL": [1]
Drag options to blanks, or click blank then click option'
A"2024-06-01T00:00:00Z"
B"1685606400"
C1685606400
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using ISO date strings instead of epoch seconds.
Using string type for the timestamp instead of number.
4fill in blank
hard

Fill both blanks to explain when expired items are deleted by DynamoDB TTL.

DynamoDB
Expired items are typically deleted within [1] hours, but actual deletion can take up to [2] hours.
Drag options to blanks, or click blank then click option'
A48
B72
C24
D96
Attempts:
3 left
💡 Hint
Common Mistakes
Assuming immediate deletion right after expiration.
Confusing hours with minutes or days.
5fill in blank
hard

Fill all three blanks to describe TTL behavior and timing in DynamoDB.

DynamoDB
TTL attribute must be a [1] representing epoch time in seconds. DynamoDB checks for expired items approximately every [2] minutes. Deletion of expired items can take up to [3] hours.
Drag options to blanks, or click blank then click option'
Anumber
Bstring
C5
D48
Attempts:
3 left
💡 Hint
Common Mistakes
Using string type for TTL attribute.
Thinking TTL checks happen instantly or only once a day.