Courseiva
Question 1,560 of 1,663
Management and OperationseasyMultiple ChoiceObjective-mapped

DBS-C01 Management and Operations Practice Question

A company has an Amazon DynamoDB table that stores IoT sensor data. The table has a partition key of device_id and a sort key of timestamp. The team wants to efficiently retrieve the latest reading for each device. Which query pattern should be used?

⚠ Common exam trap

It's easy for candidates to confuse ScanIndexForward=true with false, leading candidates to pick Option B, which retrieves the oldest rather than the latest record.

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

Query with ScanIndexForward=false and Limit=1

Setting ScanIndexForward=false on a Query returns items in descending sort-key order. By querying with the device_id as the partition key and limiting results to 1, you retrieve the most recent timestamp for that device efficiently without scanning the entire table.

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 with FilterExpression to get the latest timestamp for each device

    Why it's wrong here

    Scanning is inefficient for large tables and does not guarantee the latest item per device without additional processing.

  • Query with ScanIndexForward=true and Limit=1

    Why it's wrong here

    This returns the oldest item, not the latest.

  • GetItem with the device_id and timestamp values

    Why it's wrong here

    GetItem requires the exact sort key value, which is not known when retrieving the latest reading.

  • Query with ScanIndexForward=false and Limit=1

    Why this is correct

    This retrieves the most recent item for a given partition key by ordering the sort key in descending order and limiting to one result.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jul 4, 2026

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.

Loading comments…

Sign in to join the discussion.

This DBS-C01 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 DBS-C01 exam.