Complete the code to batch write multiple items in DynamoDB.
response = table.[1](RequestItems=batch_items)The batch_write_item method allows writing multiple items in one request, improving efficiency.
Complete the code to prepare a batch of items for writing.
batch_items = {table_name: [[1]]}Batch write requires PutRequest with the item to add.
Fix the error in the batch write code by choosing the correct parameter name.
response = client.batch_write_item([1]=batch_items)The correct parameter name is RequestItems for batch_write_item.
Fill both blanks to create a batch get request for multiple keys.
response = client.batch_get_item(RequestItems=[1]: [2])
Batch get requires the table name as key and a dict with "Keys" containing list of key dictionaries.
Fill all three blanks to filter batch get results by attribute existence.
filtered = [item for item in response['Responses'][[1]] if [2] in item and item[[3]] == True]
We access items by table name, check for 'isActive' existence, and filter where 'isActive' is True.
