Transactions in DynamoDB ensure that all operations either succeed or fail as a single unit (atomicity). Batch operations can process multiple items but do not guarantee atomicity; some operations may succeed while others fail.
BatchWriteItem returns UnprocessedItems for requests that failed due to throughput or other transient issues. The successful writes are committed, and the client can retry the unprocessed items.
TransactWriteItems expects a list under the key TransactItems, each with an operation like Put. BatchWriteItems uses BatchWriteItem and PutRequest keys. Option D matches the correct syntax for transactions.
DynamoDB BatchWriteItem limits batches to 25 items. Sending large batches causes throttling. Splitting into smaller batches and retrying unprocessed items with exponential backoff optimizes throughput.
ConditionalCheckFailed means a condition expression evaluated to false for an item in the transaction. This causes the entire transaction to abort with TransactionCanceledException.