Complete the code to put an item into the DynamoDB table.
response = table.[1](Item={'UserId': '123', 'Name': 'Alice'})
The put_item method is used to create or replace an item in a DynamoDB table.
Complete the code to specify the table name when creating a DynamoDB resource.
table = dynamodb.Table('[1]')
The table name must be a string matching the DynamoDB table you want to access.
Fix the error in the code to correctly put an item with a numeric attribute.
response = table.put_item(Item={'UserId': '123', 'Age': [1])Numeric attributes in DynamoDB should be passed as numbers, not strings.
Fill both blanks to put an item with a string and a list attribute.
response = table.put_item(Item={'UserId': '[1]', 'Tags': [2])The UserId is a string, so it needs quotes. The Tags attribute is a list of strings, represented as a Python list literal.
Fill all three blanks to put an item with a nested map attribute.
response = table.put_item(Item={'UserId': '[1]', 'Profile': [2], 'Active': [3])UserId is a string, Profile is a nested dictionary (map), and Active is a boolean value.