DBS-C01 Workload-Specific Database Design Practice Question
Exhibit
Refer to the exhibit.
```
Resources:
MyDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: "Orders"
AttributeDefinitions:
- AttributeName: "OrderID"
AttributeType: "S"
- AttributeName: "OrderDate"
AttributeType: "S"
KeySchema:
- AttributeName: "OrderID"
KeyType: HASH
- AttributeName: "OrderDate"
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 10
WriteCapacityUnits: 5
SSESpecification:
SSEEnabled: true
```Refer to the exhibit. A CloudFormation template creates a DynamoDB table. The application team needs to query orders by customer ID (which is not a key attribute). Which change to the template would enable efficient querying by customer ID?
⚠ Common exam trap
Candidates often confuse LocalSecondaryIndexes (LSIs) with GlobalSecondaryIndexes (GSIs), incorrectly assuming an LSI can be created on any attribute, when in fact an LSI must share the same hash key as the base table and can only be added during table creation.
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
✓
Add a GlobalSecondaryIndex with CustomerID as the hash key and OrderDate as the range key
A GlobalSecondaryIndex (GSI) allows querying on a non-key attribute (CustomerID) with a different key schema than the base table. By specifying CustomerID as the hash key and OrderDate as the range key, the application can efficiently query orders by CustomerID and optionally sort by OrderDate, without affecting the base table's primary key structure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Change the KeySchema to use CustomerID as the hash key
Why it's wrong here
Changing key schema would break existing application logic.
- ✗
Add a LocalSecondaryIndex on CustomerID
Why it's wrong here
LSI requires same partition key (OrderID), not CustomerID.
- ✓
Add a GlobalSecondaryIndex with CustomerID as the hash key and OrderDate as the range key
Why this is correct
GSI allows efficient querying by CustomerID.
- ✗
Enable DynamoDB Streams and use Lambda to populate a separate table
Why it's wrong here
Adds complexity; not a direct template change.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DBS-C01 question from scratch — 1,663 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 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.