AWS Certified Developer – Associate — Question 257

A company is developing a serverless ecommerce web application. The application needs to make coordinated, all-or-nothing changes to multiple items in the company's inventory table in Amazon DynamoDB.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

The correct answer is B because the TransactWriteItems operation is specifically designed for making coordinated changes to multiple items in DynamoDB, ensuring all-or-nothing execution. Option A is incorrect as BatchWriteItem does not support transactions; it can fail part of the operation. Options C and D involve additional complexity and do not natively support the required atomicity in DynamoDB.