Complete the code to specify the maximum number of items allowed in a DynamoDB transaction.
max_items = [1]DynamoDB transactions can include up to 100 actions or items.
Complete the code to set the maximum size in bytes for a DynamoDB transaction request.
max_transaction_size_bytes = [1]The maximum size for a DynamoDB transaction request is 4 MB (4,000,000 bytes).
Fix the error in the code to correctly check if the transaction size exceeds the limit.
if transaction_size > [1]: raise Exception('Transaction size limit exceeded')
The transaction size limit is 4,000,000 bytes, so the code must compare against this value.
Fill the blank to create a condition that checks if the number of items in a transaction is within limits.
if len(transaction_items) [1] 100: process_transaction()
The condition should check if the number of items is less than or equal to 100 to be valid.
Fill all three blanks to create a dictionary comprehension that filters transaction items by size and count limits.
valid_items = {item['id']: item for item in transaction_items if item['size'] [1] 4000000 and len(transaction_items) [2] 100 and item['status'] [3] 'pending'}The comprehension filters items with size less than or equal to 4,000,000 bytes, total items less than or equal to 100, and status exactly 'pending'.