A developer uses the AWS SDK for JavaScript v3 in Lambda to call DynamoDB. The code performs a read-modify-write sequence. Under high contention, inconsistencies appear. Which change best addresses this at the DynamoDB level?

Answer

Use TransactWriteItems (or conditional expressions) to perform the update atomically with the required preconditions

Explanation

Atomic conditional/transactional writes remove the race window inherent in read-modify-write sequences. This prevents conflicting updates under contention.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list