Complete the code to put an item into a DynamoDB table.
response = table.[1](Item={'UserId': '123', 'Name': 'Alice'})
The put_item method adds a new item to the DynamoDB table.
Complete the code to get an item from a DynamoDB table by its key.
response = table.[1](Key={'UserId': '123'})
The get_item method retrieves an item by its key from the DynamoDB table.
Fix the error in the query operation to find items with UserId '123'.
response = table.query(
KeyConditionExpression=Key('UserId').[1]('123')
)The eq method is used in KeyConditionExpression to specify equality in DynamoDB queries.
Fill both blanks to query items where UserId equals '123' and Status equals 'active'.
response = table.query(
KeyConditionExpression=Key('UserId').[1]('123') & Key('Status').[2]('active')
)Both conditions use eq to check for equality in the query.
Fill all three blanks to get items with UserId '123', Status 'active', and sort by Timestamp descending.
response = table.query(
KeyConditionExpression=Key('UserId').[1]('123') & Key('Status').[2]('active'),
ScanIndexForward=[3]
)The query filters by equality on UserId and Status, and sets ScanIndexForward=False to sort results in descending order.