Skip to Content

DVA-C02: How to Handle UnprocessedKeys in DynamoDB BatchGetItem Operations

Learn how to use the BatchGetItem low-level API operation to make batch requests to Amazon DynamoDB. Find out why UnprocessedKeys may occur and how to increase the resiliency of your application by using best practices for retrying and scaling.

Question

A developer has an application that makes batch requests directly to Amazon DynamoDB by using the BatchGetItem low-level API operation. The responses frequently return values in the UnprocessedKeys element.

Which actions should the developer take to increase the resiliency of the application when the batch response includes values in UnprocessedKeys? (Choose two.)

A. Retry the batch operation immediately.
B. Retry the batch operation with exponential backoff and randomized delay.
C. Update the application to use an AWS software development kit (AWS SDK) to make the requests.
D. Increase the provisioned read capacity of the DynamoDB tables that the operation accesses.
E. Increase the provisioned write capacity of the DynamoDB tables that the operation accesses.

Answer

B. Retry the batch operation with exponential backoff and randomized delay.
D. Increase the provisioned read capacity of the DynamoDB tables that the operation accesses.

Explanation

The correct answer to the question is B and D. The developer should retry the batch operation with exponential backoff and randomized delay, and increase the provisioned read capacity of the DynamoDB tables that the operation accesses.

The reason for this answer is that:

  • Option B: Retrying the batch operation with exponential backoff and randomized delay is a recommended strategy for handling throttling errors in DynamoDB. Exponential backoff means increasing the waiting time between retries exponentially, while randomized delay means adding some randomness to avoid multiple requests retrying at the same time. This way, the developer can reduce the likelihood of exceeding the provisioned throughput and avoid wasting resources on failed requests.
  • Option D: Increasing the provisioned read capacity of the DynamoDB tables that the operation accesses is another way to increase the resiliency of the application when the batch response includes values in UnprocessedKeys. Provisioned read capacity is the maximum amount of read operations per second that a table can support. By increasing this value, the developer can allow more concurrent batch requests to succeed without being throttled. However, this option also increases the cost of using DynamoDB, so it should be balanced with the expected demand and performance requirements.

The other options are incorrect because:

  • Option A: Retrying the batch operation immediately is not a good practice for dealing with UnprocessedKeys in DynamoDB. This option does not address the root cause of the problem, which is that the batch request exceeds the provisioned throughput of the table. Retrying immediately will only increase the load on the table and cause more throttling errors.
  • Option C: Updating the application to use an AWS software development kit (AWS SDK) to make the requests is not a necessary action for increasing the resiliency of the application when the batch response includes values in UnprocessedKeys. The AWS SDKs provide convenience methods for making batch requests to DynamoDB, but they do not automatically handle UnprocessedKeys or throttling errors. The developer still needs to implement retry logic and adjust provisioned capacity as needed.
  • Option E: Increasing the provisioned write capacity of the DynamoDB tables that the operation accesses is not a relevant action for increasing the resiliency of the application when the batch response includes values in UnprocessedKeys. Provisioned write capacity is the maximum amount of write operations per second that a table can support. However, the question is about using BatchGetItem, which is a read operation, not a write operation. Therefore, increasing provisioned write capacity will not affect the outcome of BatchGetItem requests.

The latest AWS Certified Developer – Associate DVA-C02 certification actual real practice exam question and answer (Q&A) dumps are available free, which are helpful for you to pass the AWS Certified Developer – Associate DVA-C02 exam and earn AWS Certified Developer – Associate DVA-C02 certification.

AWS Certified Developer - Associate DVA-C02 Exam Questions and Answers

Alex Lim is a certified IT Technical Support Architect with over 15 years of experience in designing, implementing, and troubleshooting complex IT systems and networks. He has worked for leading IT companies, such as Microsoft, IBM, and Cisco, providing technical support and solutions to clients across various industries and sectors. Alex has a bachelor’s degree in computer science from the National University of Singapore and a master’s degree in information security from the Massachusetts Institute of Technology. He is also the author of several best-selling books on IT technical support, such as The IT Technical Support Handbook and Troubleshooting IT Systems and Networks. Alex lives in Bandar, Johore, Malaysia with his wife and two chilrdren. You can reach him at [email protected] or follow him on Website | Twitter | Facebook

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that is committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we have not implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you are currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.