Exam DVA-C02 Topic 3 Question 271 Discussion

Actual exam question for Amazon's DVA-C02 exam
Question #: 271
Topic #: 3
A developer is creating an AWS Lambda function that searches for items from an Amazon DynamoDB table that contains customer contact information- The DynamoDB table items have the customer's email_address as the partition key and additional properties such as customer_type, name, and job_tltle.
The Lambda function runs whenever a user types a new character into the customer_type text input The developer wants the search to return partial matches of all the email_address property of a particular customer_type The developer does not want to recreate the DynamoDB table.
What should the developer do to meet these requirements?

Suggested Answer: A Vote an answer

* Understand the Problem: The existing DynamoDB table has email_address as the partition key.
Searching by customer_type requires a different data access pattern. We need an efficient way to query for partial matches on email_address based on customer_type.
* Why Global Secondary Index (GSI):
* GSIs allow you to define a different partition key and sort key from the main table, enabling new query patterns.
* In this case, having customer_type as the GSI's partition key lets you group all emails with the same customer type together.
* Using email_address as the sort key allows ordering within each customer type, facilitating the partial matching.
* Querying the GSI:
* You'll perform a query operation on the GSI, not the original table.
* Use the begins_with key condition expression on the GSI's sort key (email_address) to find partial matches as the user types in the customer_type field.
References:
DynamoDB Global Secondary Indexes: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide
/GSI.html
DynamoDB Query Operation: [invalid URL removed]
Key Condition Expressions: [invalid URL removed]

by Hiram at Apr 02, 2026, 07:07 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10