Development with AWS Services
A DynamoDB BatchWriteItem call returns HTTP 200 with a nonempty UnprocessedItems map. The application must complete the writes without resubmitting successful operations; what should its SDK-based code do?
Show the answer
Correct answerD. Retry the returned UnprocessedItems with exponential backoff.
AWhy not this: Resending the original batch repeats successful writes, and a timeout change does not resolve throttling.
BWhy not this: HTTP 200 does not mean every write in a BatchWriteItem request was processed.
CWhy not this: An ACTIVE table can still return unprocessed writes; table state does not establish batch completion.
DWhy this is right: The returned map identifies the writes that still require processing; backoff reduces pressure on DynamoDB.
BatchWriteItem can succeed at the HTTP level while leaving individual writes unprocessed. Retry only UnprocessedItems with exponential backoff; retrying the original batch unnecessarily resubmits successful writes.