0
0
DynamoDBquery~10 mins

Why automatic expiration manages data lifecycle in DynamoDB - Test Your Understanding

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

Complete the code to enable automatic expiration on a DynamoDB table by specifying the TTL attribute.

DynamoDB
aws dynamodb update-time-to-live --table-name MyTable --time-to-live-specification Enabled=true, AttributeName=[1]
Drag options to blanks, or click blank then click option'
AExpirationTime
BDeleteAt
CTTL
DExpireOn
Attempts:
3 left
💡 Hint
Common Mistakes
Using attribute names like 'ExpirationTime' or 'DeleteAt' which are not recognized by DynamoDB TTL.
2fill in blank
medium

Complete the code to query items that have not yet expired by filtering on the TTL attribute.

DynamoDB
SELECT * FROM MyTable WHERE [1] > unixTimestamp(CURRENT_TIMESTAMP)
Drag options to blanks, or click blank then click option'
ADeleteAt
BTTL
CExpirationTime
DExpireOn
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect attribute names that do not match the TTL attribute.
3fill in blank
hard

Fix the error in the TTL configuration command by selecting the correct option for enabling TTL.

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
BTrue
C"true"
DTRUE
Attempts:
3 left
💡 Hint
Common Mistakes
Using capitalized or quoted boolean values causing syntax errors.
4fill in blank
hard

Fill both blanks to create a DynamoDB table with TTL enabled on the 'TTL' attribute.

DynamoDB
aws dynamodb create-table --table-name MyTable --attribute-definitions AttributeName=ID,AttributeType=S --key-schema AttributeName=ID,KeyType=HASH --billing-mode PAY_PER_REQUEST --[1] Enabled=true,AttributeName=[2]
Drag options to blanks, or click blank then click option'
Atime-to-live-specification
Btime-to-live
Cttl
Dttl-specification
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect parameter names like 'ttl' or 'ttl-specification' which are invalid.
5fill in blank
hard

Fill all three blanks to write a DynamoDB expression that deletes expired items based on the TTL attribute.

DynamoDB
DELETE FROM MyTable WHERE [1] <= unixTimestamp([2]) AND [3] = true
Drag options to blanks, or click blank then click option'
ATTL
BCURRENT_TIMESTAMP
CisExpired
DExpirationFlag
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect attribute names or missing the expiration flag condition.