Courseiva
Data Store ManagementmediumMultiple ChoiceObjective-mapped

DEA-C01 Data Store Management Practice Question

Exhibit

Refer to the exhibit.

{
  "Tables": [
    {
      "TableName": "Orders",
      "KeySchema": [
        {"AttributeName": "order_id", "KeyType": "HASH"},
        {"AttributeName": "customer_id", "KeyType": "RANGE"}
      ],
      "AttributeDefinitions": [
        {"AttributeName": "order_id", "AttributeType": "S"},
        {"AttributeName": "customer_id", "AttributeType": "S"},
        {"AttributeName": "order_date", "AttributeType": "S"}
      ],
      "GlobalSecondaryIndexes": [
        {
          "IndexName": "CustomerDateIndex",
          "KeySchema": [
            {"AttributeName": "customer_id", "KeyType": "HASH"},
            {"AttributeName": "order_date", "KeyType": "RANGE"}
          ],
          "Projection": {"ProjectionType": "ALL"}
        }
      ]
    }
  ]
}

Refer to the exhibit. A DynamoDB table 'Orders' has a GSI 'CustomerDateIndex'. A developer tries to query the GSI for all orders of a customer between two dates. The query fails. What is the most likely reason?

⚠ Common exam trap

AWS often tests the misconception that any string date format works for range queries, but the trap here is that DynamoDB requires lexicographically sortable strings for BETWEEN conditions, and non-ISO formats will silently fail or return incorrect 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

The query uses a date format that is not lexicographically sortable as a string

DynamoDB's Query operation requires the sort key to be lexicographically sortable when using comparison operators like BETWEEN. If the 'order_date' attribute is stored as a non-lexicographically sortable string format (e.g., 'MM-DD-YYYY' instead of 'YYYY-MM-DD'), the BETWEEN condition will fail to return correct results or may throw an error. The GSI's sort key must be in a format that supports string comparison for range queries to work properly.

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 GSI does not include 'order_id' in the key schema

    Why it's wrong here

    GSI keys are independent of table keys.

  • The 'customer_id' attribute is not a partition key in the GSI

    Why it's wrong here

    It is defined as HASH key.

  • The query uses a date format that is not lexicographically sortable as a string

    Why this is correct

    String sort on dates requires ISO 8601 format.

  • The 'order_date' attribute is not a sort key in the GSI

    Why it's wrong here

    It is defined as RANGE key.

About these practice questions

This DEA-C01 question is part of Courseiva's 1,711-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 by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.