exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 437 discussion

A company has an ecommerce platform. A developer is designing an Amazon DynamoDB table to store customer order data for the platform. The table uses the order ID as the partition key.

The developer needs to modify the table to get all order IDs that are associated with a given customer email address in a single query. The solution must give the developer the ability to query order IDs by other item attributes in the future.

Which solution will meet these requirements?

  • A. Configure the partition key to use the customer email address as the sort key.
  • B. Update the table to use the customer email address as the partition key.
  • C. Create a local secondary index (LSI) with the customer email address as the sort key.
  • D. Create a global secondary index (GSI) with the customer email address as the partition key.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
vbloise
3 days, 3 hours ago
Selected Answer: D
The main table uses order ID as the partition key (good for fast lookups by order ID). You now need a new access pattern: query by customer email address. A Global Secondary Index (GSI) lets you define different partition keys and sort keys from the base table, supporting completely different queries. Using customer email address as the GSI partition key allows you to quickly fetch all orders for a given email. GSIs also allow you to add more indexes later if you want to query by other attributes (because you can define multiple GSIs).
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago