DVA-C02 Development with AWS Services Practice Question
Network Topology
The developer runs a scan on the DynamoDB table 'orders' with a filter expression to find items with order_status equal to 'SHIPPED'. The output shows ScannedCount of 10000 but Count of 0. Which statement is correct?
⚠ Common exam trap
Many candidates confuse ScannedCount with Count, assuming that the filter is applied before reading (like a SQL WHERE clause), when in fact DynamoDB scans all items first and then filters, so ScannedCount reflects total items read and Count reflects matches only.
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
✓
The scan retrieved 10,000 items from the table, but none matched the filter condition.
In DynamoDB, a Scan operation retrieves all items in the table or index up to the 1 MB limit, then applies any filter expression client-side. The ScannedCount of 10,000 indicates that 10,000 items were read from the table, but the Count of 0 means none of those items satisfied the filter condition (order_status = 'SHIPPED'). This is the expected behavior: filters are applied after the data is read, not before.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The scan retrieved 10,000 items from the table, but none matched the filter condition.
Why this is correct
The `ScannedCount` metric in DynamoDB represents the total number of items read from the table before any `FilterExpression` is applied. If the `ScannedCount` is 10,000 and the `Count` (number of items returned after filtering) is 0, it indicates that all 10,000 items were successfully retrieved from the table, but none of them met the criteria specified in the `FilterExpression`. This is a common scenario when the filter condition is very specific or no matching data exists.
- ✗
The scan only returned items that matched the filter, so there are no items with status SHIPPED.
Why it's wrong here
This statement is incorrect because DynamoDB's `FilterExpression` is applied *after* items are read from the table, not before. The `ScannedCount` of 10,000 explicitly indicates that 10,000 items were retrieved from the table's storage. The fact that zero items were *returned* (the `Count` metric) means that out of those 10,000 scanned items, none satisfied the filter condition for 'status SHIPPED', not that only matching items were initially scanned.
- ✗
The filter expression syntax is incorrect, causing the scan to return zero items.
Why it's wrong here
An incorrect `FilterExpression` syntax would typically result in an immediate `ValidationException` or similar error from the DynamoDB service, preventing the scan operation from executing successfully. The presence of a `ScannedCount` of 10,000 confirms that the scan command was syntactically valid and successfully processed items from the table. The zero items returned are due to the logical outcome of the filter, not a syntax error.
- ✗
The scan applied the filter before reading items, so only matching items were scanned.
Why it's wrong here
DynamoDB `Scan` operations are designed to read items from the table or index first, and then apply any specified `FilterExpression` to the retrieved dataset. The `ScannedCount` reflects the total number of items read from the underlying storage, irrespective of the filter's selectivity. Therefore, applying the filter *before* reading items would contradict the fundamental execution model of a DynamoDB `Scan` operation, which always processes items before filtering.
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.