0
0
DynamoDBquery~10 mins

BatchGetItem 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 table name in the BatchGetItem request.

DynamoDB
{
  "RequestItems": {
    "[1]": {
      "Keys": [
        { "UserId": { "S": "123" } },
        { "UserId": { "S": "456" } }
      ]
    }
  }
}
Drag options to blanks, or click blank then click option'
AProducts
BOrders
CUsers
DInventory
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong table name that does not exist.
Forgetting to put the table name as a key.
2fill in blank
medium

Complete the code to specify the key attribute name for the BatchGetItem request.

DynamoDB
{
  "RequestItems": {
    "Users": {
      "Keys": [
        { "[1]": { "S": "123" } },
        { "UserId": { "S": "456" } }
      ]
    }
  }
}
Drag options to blanks, or click blank then click option'
AOrderId
BUserId
CProductId
DInventoryId
Attempts:
3 left
💡 Hint
Common Mistakes
Using a key attribute name that does not exist in the table.
Mixing key names from different tables.
3fill in blank
hard

Fix the error in the BatchGetItem request by completing the missing attribute type.

DynamoDB
{
  "RequestItems": {
    "Users": {
      "Keys": [
        { "UserId": { "[1]": "123" } },
        { "UserId": { "S": "456" } }
      ]
    }
  }
}
Drag options to blanks, or click blank then click option'
AB
BN
CBOOL
DS
Attempts:
3 left
💡 Hint
Common Mistakes
Using N for string values causes errors.
Omitting the attribute type entirely.
4fill in blank
hard

Fill both blanks to specify the ProjectionExpression and ConsistentRead options in BatchGetItem.

DynamoDB
{
  "RequestItems": {
    "Users": {
      "Keys": [
        { "UserId": { "S": "123" } }
      ],
      "[1]": "UserName, Email",
      "[2]": true
    }
  }
}
Drag options to blanks, or click blank then click option'
AProjectionExpression
BConsistentRead
CFilterExpression
DReturnConsumedCapacity
Attempts:
3 left
💡 Hint
Common Mistakes
Using FilterExpression instead of ProjectionExpression.
Setting ConsistentRead to a string instead of boolean.
5fill in blank
hard

Fill all three blanks to complete the BatchGetItem request with multiple tables and keys.

DynamoDB
{
  "RequestItems": {
    "Users": {
      "Keys": [
        { "UserId": { "S": "123" } },
        { "UserId": { "S": "456" } }
      ]
    },
    "[1]": {
      "Keys": [
        { "[2]": { "S": "789" } },
        { "OrderId": { "S": "101" } }
      ],
      "[3]": false
    }
  }
}
Drag options to blanks, or click blank then click option'
AOrders
BOrderId
CConsistentRead
DUsers
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong table name for the second table.
Mixing key attribute names between tables.
Setting ConsistentRead to a string instead of boolean.