Question 49 of 724
DVA-C02 Development with AWS Services Practice Question
A developer is building a serverless application that uses Amazon DynamoDB. The application needs to retrieve an item by its primary key frequently. Which DynamoDB API call should the developer use to achieve the lowest latency?
⚠ Common exam trap
Many exam-takers confuse Query with GetItem, assuming Query is always faster because it uses a key condition, but Query still requires evaluating the sort key and can return multiple items, whereas GetItem is the only API optimized for a single-item primary key lookup.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
GetItem
The GetItem API call is the most efficient way to retrieve a single item by its primary key in DynamoDB, as it directly accesses the item using the hash key (and optionally the sort key) with consistent, single-digit millisecond latency. Unlike Scan or Query, GetItem does not need to evaluate any conditions or filter through other items, making it the lowest-latency option for this specific use case.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Scan
Why it's wrong here
The Scan operation reads every item in the specified table or secondary index, then applies an optional filter expression to the results. This makes it extremely inefficient and costly for retrieving a single, known item, as it consumes provisioned read capacity units (RCUs) proportional to the total data scanned, not just the single item returned. It should be avoided for targeted lookups due to high latency and resource consumption.
- ✗
Query
Why it's wrong here
The Query operation efficiently retrieves all items that share a specific partition key value, and optionally a sort key condition. While more efficient than Scan for targeted data, it is designed to retrieve collections of items, not a single, unique item. If a sort key is not provided or is not unique enough, it will return multiple items, requiring additional client-side filtering or server-side processing that reads more data than necessary for a single item.
- ✓
GetItem
Why this is correct
The GetItem operation is the most efficient and recommended method for retrieving a single item from a DynamoDB table. It directly accesses the item using its complete primary key (partition key, and sort key if applicable), resulting in minimal latency and consuming the fewest provisioned read capacity units (RCUs). This direct lookup mechanism makes it ideal for precise, single-item data retrieval.
- ✗
BatchGetItem
Why it's wrong here
The BatchGetItem operation is optimized for retrieving up to 100 distinct items from one or more tables in a single network request, reducing round-trip latency when fetching multiple items. However, for retrieving just a single item, using BatchGetItem introduces unnecessary overhead in request parsing and response formatting compared to the direct GetItem call, making it less efficient and adding complexity without benefit.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.