0
0
DynamoDBquery~10 mins

Why change tracking enables reactions 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 DynamoDB Streams for change tracking on a table.

DynamoDB
aws dynamodb update-table --table-name MyTable --stream-specification StreamEnabled=[1],StreamViewType=NEW_AND_OLD_IMAGES
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
Cenabled
Don
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'false' disables change tracking.
Using strings like 'enabled' or 'on' are invalid here.
2fill in blank
medium

Complete the code to read change events from a DynamoDB Stream using AWS CLI.

DynamoDB
aws dynamodbstreams get-records --[1]
Drag options to blanks, or click blank then click option'
AshardIterator
BShardIterator
Cshard-iterator
DSHARDITERATOR
Attempts:
3 left
💡 Hint
Common Mistakes
Using camelCase or uppercase parameter names causes errors.
Misspelling the parameter name.
3fill in blank
hard

Fix the error in the code to filter DynamoDB Stream events for INSERT operations only.

DynamoDB
if event['eventName'] == '[1]': process(event)
Drag options to blanks, or click blank then click option'
AINSERT
BREMOVE
CUPDATE
DMODIFY
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'UPDATE' or 'MODIFY' instead of 'INSERT'.
Using lowercase event names.
4fill in blank
hard

Fill both blanks to create a DynamoDB Stream ARN for a table in region us-east-1.

DynamoDB
arn:aws:dynamodb:[1]:123456789012:table/[2]/stream/2023-01-01T00:00:00.000
Drag options to blanks, or click blank then click option'
Aus-east-1
Bus-west-2
CMyTable
DYourTable
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up region codes.
Using wrong table names in the ARN.
5fill in blank
hard

Fill all three blanks to create a Python dictionary comprehension that maps item IDs to new values from DynamoDB Stream records where the event is INSERT.

DynamoDB
result = {record['dynamodb']['Keys']['ID']['S']: record['dynamodb']['NewImage']['Value']['S'] for record in records if record['eventName'] == '[1]' and '[2]' in record['dynamodb']['NewImage'] and record['dynamodb']['NewImage']['Value']['S'] [3] ''}
Drag options to blanks, or click blank then click option'
AINSERT
BValue
C!=
DKeys
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong event names like 'MODIFY'.
Checking wrong keys in the dictionary.
Using '=' instead of '!=' for comparison.