A developer needs to fetch several specific items from a DynamoDB table using a single API call while minimizing load on the database. Which DynamoDB API should be used?
Choose an answer
Tap an option to check your answer.
Correct answer: BatchGetItem.
Why this is the answer
BatchGetItem is the most efficient choice because it allows fetching up to 100 items from one or more tables in a single API call. This minimizes the number of round trips to the database, reducing latency and overall load compared to making individual GetItem calls. GetItem retrieves only a single item, requiring multiple calls for several items. Scan reads all items in a table (or a large portion if filtered), which is inefficient and costly for fetching specific items. Query retrieves items based on a primary key and an optional sort key, but it's designed for a single partition and doesn't offer the multi-item, multi-table efficiency of BatchGetItem for disparate items.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed