Complete the code to specify the DynamoDB table name in the Step Functions task.
{
"Type": "Task",
"Resource": "arn:aws:states:::dynamodb:putItem",
"Parameters": {
"TableName": "[1]",
"Item": {
"ID": { "S": "123" },
"Status": { "S": "Pending" }
}
},
"End": true
}The TableName parameter must be set to the actual DynamoDB table name, such as MyTable.
Complete the code to specify the attribute name for the item key in the DynamoDB putItem task.
"Item": { "[1]": { "S": "123" }, "Status": { "S": "Pending" } }
The attribute name for the primary key in the item must match the table's key attribute, commonly ID.
Fix the error in the DynamoDB updateItem parameters by completing the attribute update expression.
"UpdateExpression": "SET Status = [1]", "ExpressionAttributeValues": { ":newStatus": { "S": "Completed" } }
The UpdateExpression must use a placeholder starting with a colon, like :newStatus, to refer to the value in ExpressionAttributeValues.
Fill both blanks to complete the DynamoDB getItem parameters for retrieving an item by its key.
"TableName": "[1]", "Key": { "[2]": { "S": "123" } }
The TableName must be the actual table name, and the Key attribute must match the primary key attribute name, usually ID.
Fill all three blanks to complete the DynamoDB query parameters filtering items by status.
"TableName": "[1]", "KeyConditionExpression": "[2] = :statusVal", "ExpressionAttributeValues": { ":statusVal": { "S": "[3]" } }
The TableName is the DynamoDB table name, the KeyConditionExpression uses the attribute name to filter, and the ExpressionAttributeValues provides the value to match, such as Pending.