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 71 discussion

A developer is working on an existing application that uses Amazon DynamoDB as its data store. The DynamoDB table has the following attributes: partNumber (partition key), vendor (sort key), description, productFamily, and productType. When the developer analyzes the usage patterns, the developer notices that there are application modules that frequently look for a list of products based on the productFamily and productType attributes.

The developer wants to make changes to the application to improve performance of the query operations.

Which solution will meet these requirements?

  • A. Create a global secondary index (GSI) with productFamily as the partition key and productType as the sort key.
  • B. Create a local secondary index (LSI) with productFamily as the partition key and productType as the sort key.
  • C. Recreate the table. Add partNumber as the partition key and vendor as the sort key. During table creation, add a local secondary index (LSI) with productFamily as the partition key and productType as the sort key.
  • D. Update the queries to use Scan operations with productFamily as the partition key and productType as the sort key.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
Fyssy
Highly Voted 1 year, 6 months ago
Selected Answer: A
reate a Global Secondary Index (GSI): The developer should create a new GSI on the DynamoDB table with the productFamily attribute as the partition key and the productType attribute as the sort key. This will allow the application to perform fast queries on these attributes without scanning the entire table.
upvoted 10 times
...
Majong
Highly Voted 1 year, 5 months ago
Selected Answer: A
LSI can´t be created on an already existing table and as Fyssy says. A - create new GSI will make the querying faster and you do not need to recreate the whole table.
upvoted 9 times
...
sumanshu
Most Recent 4 months ago
Selected Answer: A
A) Correct - GSI will give alternative Primary Key (HASH or HASH + Sort Key) from the base table. B) Eliminated - An LSI shares the same partition key as the base table but allows a different sort key. LSIs must be defined at the time of table creation and cannot be added to an existing table.
upvoted 2 times
...
65703c1
5 months, 1 week ago
Selected Answer: A
A is the correct answer.
upvoted 1 times
...
maurice2005
7 months, 1 week ago
Selected Answer: C
Option C improve more performance. The question didn't care about effort
upvoted 1 times
...
SerialiDr
9 months, 3 weeks ago
Selected Answer: A
This is a viable solution. A GSI allows you to query data using an alternate key, in this case, productFamily and productType. This would enable efficient queries based on these attributes, which is aligned with the observed usage patterns.
upvoted 2 times
...
winzzhhzzhh
1 year, 1 month ago
Selected Answer: A
LSI: different sort key but the same partition key GSI: different partition key and a different sort key
upvoted 5 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