Complete the code to define the partition key for the main table.
PartitionKey: [1]The main table's partition key is usually named "PK" to represent the primary key.
Complete the code to set the sort key for the GSI to overload multiple entity types.
GSI1SortKey: [1]The GSI sort key is named "GSI1SK" to allow overloading with different entity types.
Fix the error in the query to fetch all related items by GSI partition key.
KeyConditionExpression: "GSI1PK = [1]"
In DynamoDB queries, attribute values must be referenced with placeholders starting with a colon, like ':pkValue'.
Fill both blanks to complete the expression that filters items by entity type and status.
FilterExpression: "EntityType = [1] AND Status = [2]"
The filter expression uses placeholders for values. Here, 'EntityType' equals ':entityType' which is 'User', and 'Status' equals ':status' which is 'Active'.
Fill all three blanks to build a dictionary for expression attribute values in a DynamoDB query.
ExpressionAttributeValues: [1]: "User", [2]: "Active", [3]: "12345"
The expression attribute values map placeholders to actual values. Here, ':entityType' maps to 'User', ':status' to 'Active', and ':userId' to '12345'.