0
0
DynamoDBquery~10 mins

Step Functions with 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 DynamoDB table name in the Step Functions task.

DynamoDB
{
  "Type": "Task",
  "Resource": "arn:aws:states:::dynamodb:putItem",
  "Parameters": {
    "TableName": "[1]",
    "Item": {
      "ID": { "S": "123" },
      "Status": { "S": "Pending" }
    }
  },
  "End": true
}
Drag options to blanks, or click blank then click option'
ADynamoDBTable
BTableName
CMyTable
DStepFunctionTable
Attempts:
3 left
💡 Hint
Common Mistakes
Using a placeholder like 'TableName' instead of the actual table name.
Confusing parameter names with values.
2fill in blank
medium

Complete the code to specify the attribute name for the item key in the DynamoDB putItem task.

DynamoDB
"Item": {
  "[1]": { "S": "123" },
  "Status": { "S": "Pending" }
}
Drag options to blanks, or click blank then click option'
AItemKey
BKey
CPrimaryKey
DID
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic names like 'Key' instead of the actual attribute name.
Confusing attribute names with parameter names.
3fill in blank
hard

Fix the error in the DynamoDB updateItem parameters by completing the attribute update expression.

DynamoDB
"UpdateExpression": "SET Status = [1]",
"ExpressionAttributeValues": {
  ":newStatus": { "S": "Completed" }
}
Drag options to blanks, or click blank then click option'
AnewStatus
B:newStatus
C"Completed"
D:Status
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the colon in the placeholder name.
Using the actual string value instead of a placeholder.
4fill in blank
hard

Fill both blanks to complete the DynamoDB getItem parameters for retrieving an item by its key.

DynamoDB
"TableName": "[1]",
"Key": {
  "[2]": { "S": "123" }
}
Drag options to blanks, or click blank then click option'
AMyTable
BStatus
CID
DItemKey
Attempts:
3 left
💡 Hint
Common Mistakes
Using attribute names that do not match the table schema.
Confusing table name with attribute names.
5fill in blank
hard

Fill all three blanks to complete the DynamoDB query parameters filtering items by status.

DynamoDB
"TableName": "[1]",
"KeyConditionExpression": "[2] = :statusVal",
"ExpressionAttributeValues": {
  ":statusVal": { "S": "[3]" }
}
Drag options to blanks, or click blank then click option'
AOrdersTable
BStatus
CPending
DOrderID
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing attribute names and table names.
Using incorrect values in the expression attribute values.