AWS Certified Developer – Associate — Question 121
An application reads data from an Amazon DynamoDB table. Several times a day, for a period of 15 seconds, me application receives multiple ProvisionedThroughputExceeded errors.
How should this exception be handled?
Answer options
- A. Create a new global secondary index for the table to help with the additional requests.
- B. Retry the failed read requests with exponential backoff.
- C. Immediately retry the failed read requests.
- D. Use the DynamoDB "UpdateItem" API to increase the provisioned throughput capacity of the table.
Correct answer: B
Explanation
The correct approach is to retry the failed read requests with exponential backoff, as this method helps to avoid overwhelming the service by gradually increasing the wait time between retries. Creating a global secondary index (A) may not directly address the immediate issue, while immediate retries (C) and increasing provisioned throughput (D) could lead to further errors or increased costs without proper handling.