Complete the code to query items with a specific partition key.
response = table.query(KeyConditionExpression=Key('UserId').[1](':user_id'))
In DynamoDB, the KeyConditionExpression uses the eq method to specify equality for the partition key.
Complete the code to query items with a partition key and sort key greater than a value.
response = table.query(KeyConditionExpression=Key('UserId').eq(':user_id') & Key('Timestamp').[1](':time_val'))
The gt method means 'greater than' and is used to filter sort keys greater than a given value.
Fix the error in the key condition expression to query items with a partition key and sort key less than or equal to a value.
response = table.query(KeyConditionExpression=Key('UserId').eq(':user_id') & Key('Timestamp').[1](':time_val'))
The lte method means 'less than or equal to', which fixes the error for the intended query.
Fill both blanks to query items with a partition key equal to a value and a sort key between two values.
response = table.query(KeyConditionExpression=Key('UserId').[1](':user_id') & Key('Timestamp').[2](':start_time', ':end_time'))
The partition key uses eq for equality, and the sort key uses between to specify a range.
Fill all three blanks to query items with a partition key equal to a value, a sort key greater than a value, and less than or equal to another value.
response = table.query(KeyConditionExpression=Key('UserId').[1](':user_id') & Key('Timestamp').[2](':start_time') & Key('Timestamp').[3](':end_time'))
The partition key uses eq for equality, the sort key uses gt for greater than the start time, and lte for less than or equal to the end time.