Complete the code to specify the partition key attribute name in a DynamoDB table creation.
KeySchema=[{'AttributeName': [1], 'KeyType': 'HASH'}]The partition key attribute name is specified with 'AttributeName' in the KeySchema. 'UserId' is a common partition key.
Complete the code to define the attribute type for the partition key in the attribute definitions.
AttributeDefinitions=[{'AttributeName': 'UserId', 'AttributeType': [1]]The partition key attribute type must be specified. 'S' stands for String, which is common for partition keys.
Fix the error in the partition key definition by choosing the correct key type.
KeySchema=[{'AttributeName': 'UserId', 'KeyType': [1]]The partition key must have the key type 'HASH'. 'RANGE' is for sort keys.
Fill both blanks to create a DynamoDB table with a partition key and a sort key.
KeySchema=[{'AttributeName': [1], 'KeyType': 'HASH'}, {'AttributeName': [2], 'KeyType': 'RANGE'}]The partition key is 'UserId' with 'HASH' key type, and the sort key is 'Timestamp' with 'RANGE' key type.
Fill all three blanks to define attribute definitions for a table with a string partition key and a number sort key.
AttributeDefinitions=[{'AttributeName': [1], 'AttributeType': [2], {'AttributeName': [3], 'AttributeType': 'N'}]'UserId' is the partition key with type 'S' (string), and 'Timestamp' is the sort key with type 'N' (number).