Courseiva
Data Store Management →mediumMultiple Choice

DEA-C01 Data Store Management Practice Question

A data engineer manages an Amazon DynamoDB table that stores IoT sensor readings. Each item has a partition key of deviceId and a sort key of timestamp. The table is configured with on-demand capacity mode. The engineer needs to retrieve all readings for a specific device within the last 24 hours, and the query must return results sorted by timestamp in ascending order. Which operation should the engineer use?

⚠ Common exam trap

The trap here is assuming that Scan with a filter is equivalent to Query for range-based access patterns, but Scan is inefficient and does not return sorted results.

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

✓

Call the Query API with the partition key value and a condition on the sort key using the BETWEEN operator.

The Query API is designed for efficient retrieval of items sharing a partition key, with optional sort key conditions. Using BETWEEN on the timestamp sort key retrieves exactly the last 24 hours of readings for a device. Results are automatically sorted by the sort key, meeting the ascending order requirement. Scan, GetItem, and BatchGetItem do not provide this combination of range filtering and sorted output.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Call the Query API with the partition key value and a condition on the sort key using the BETWEEN operator.

    Why this is correct

    The Query API requires a partition key value and allows an optional sort key condition. Using BETWEEN on the timestamp sort key efficiently retrieves the desired range. Results are returned in sorted order by the sort key, satisfying the ascending requirement. This is the most efficient and appropriate operation for this access pattern.

  • ✗

    Call the GetItem API with the partition key and sort key values.

    Why it's wrong here

    GetItem retrieves a single item by its full primary key (partition and sort key). It cannot retrieve a range of items or multiple timestamps. This operation would return only one reading, not all readings within the last 24 hours. Therefore, it does not meet the requirement.

  • ✗

    Call the Scan API with a FilterExpression on deviceId and timestamp.

    Why it's wrong here

    Scan reads every item in the table and then applies the filter, consuming far more read capacity and time than necessary. It does not guarantee sorted results by sort key. For a targeted range query on a single partition, Scan is inefficient and inappropriate. The engineer should avoid Scan for this use case.

  • ✗

    Call the BatchGetItem API with a list of partition and sort key pairs.

    Why it's wrong here

    BatchGetItem retrieves multiple items by their exact primary keys, but the engineer does not know all the timestamp values in advance. It cannot perform a range query on the sort key. This approach is impractical and does not leverage the sort key ordering. It is not suitable for retrieving a time range.

About these practice questions

This DEA-C01 question is part of Courseiva's 1,321-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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