0
0
DynamoDBquery~10 mins

TransactGetItems 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 operation type for a TransactGetItems request.

DynamoDB
{
  "TransactItems": [
    {
      "[1]": {
        "Key": {"Id": {"S": "123"}},
        "TableName": "Users"
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
ADelete
BGet
CUpdate
DPut
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Put' or 'Update' instead of 'Get' in TransactGetItems.
Confusing TransactGetItems with TransactWriteItems.
2fill in blank
medium

Complete the code to specify the primary key attribute name in the Key object.

DynamoDB
{
  "TransactItems": [
    {
      "Get": {
        "Key": {"[1]": {"S": "abc123"}},
        "TableName": "Orders"
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
AOrderId
BUserId
CProductId
DTransactionId
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-primary key attribute in the Key object.
Misspelling the key attribute name.
3fill in blank
hard

Fix the error in the TransactGetItems request by completing the missing field.

DynamoDB
{
  "TransactItems": [
    {
      "Get": {
        "Key": {"UserId": {"S": "user789"}},
        "[1]": "Customers"
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
AProjectionExpression
BIndexName
CConditionExpression
DTableName
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the TableName field causes errors.
Using IndexName instead of TableName in TransactGetItems.
4fill in blank
hard

Fill both blanks to create a TransactGetItems request with two items from different tables.

DynamoDB
{
  "TransactItems": [
    {
      "[1]": {
        "Key": {"Id": {"S": "101"}},
        "TableName": "Products"
      }
    },
    {
      "[2]": {
        "Key": {"UserId": {"S": "u202"}},
        "TableName": "Users"
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
AGet
BPut
CUpdate
DDelete
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing 'Put' or 'Update' operations in TransactGetItems.
Using different operation types for items in the same request.
5fill in blank
hard

Fill all three blanks to build a TransactGetItems request with condition expression and projection expression.

DynamoDB
{
  "TransactItems": [
    {
      "Get": {
        "Key": {"OrderId": {"S": "ord303"}},
        "TableName": "Orders",
        "[1]": "attribute_exists(OrderId)",
        "[2]": "OrderDate, TotalAmount",
        "[3]": "OrdersIndex"
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
AConditionExpression
BProjectionExpression
CIndexName
DFilterExpression
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing FilterExpression with ConditionExpression in TransactGetItems.
Omitting IndexName when querying a secondary index.