QuestionQ17

Troubleshooting and Optimization

A developer is creating an application that uses an Amazon DynamoDB table. The developer needs to develop code that reads all records that were added to the table during the previous day, creates HTML reports, and pushes the reports into third-party storage. The item size varies from 1 KB to 4 KB, and the index structure is defined with the date. The developer needs to minimize the read capacity that the application requires from the DynamoDB table.

Which DynamoDB API operation should the developer use in the code to meet these requirements?

  • A Query
  • B Scan
  • C BatchGetItem
  • D GetItem
Explanation

Query is the most efficient DynamoDB operation when the index is defined by date. It allows targeted retrieval of items matching a specific partition key value (the previous day's date) without scanning the entire table, minimizing read capacity consumption and improving performance.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!