exam questions

Exam AWS Certified Developer Associate All Questions

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

Exam AWS Certified Developer Associate topic 1 question 362 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 362
Topic #: 1
[All AWS Certified Developer Associate Questions]

A company has an ecommerce application. To track product reviews, the company's development team uses an Amazon DynamoDB table.

Every record includes the following:

• A Review ID, a 16-digit universally unique identifier (UUID)
• A Product ID and User ID, 16-digit UUIDs that reference other tables
• A Product Rating on a scale of 1-5
• An optional comment from the user

The table partition key is the Review ID. The most performed query against the table is to find the 10 reviews with the highest rating for a given product.

Which index will provide the FASTEST response for this query?

  • A. A global secondary index (GSI) with Product ID as the partition key and Product Rating as the sort key
  • B. A global secondary index (GSI) with Product ID as the partition key and Review ID as the sort key
  • C. A local secondary index (LSI) with Product ID as the partition key and Product Rating as the sort key
  • D. A local secondary index (LSI) with Review ID as the partition key and Product ID 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
DrCloud
Highly Voted 2 years, 5 months ago
Selected Answer: A
Ask: (1) Find the 10 reviews with the highest rating for a given product. - We need: Product ID as the partition key and Product Rating as the sort key. - Eliminate, LSI (2) FASTEST ==> GSI - A global secondary has its own provisioned throughput settings for read and write activity that are separate from those of the table. - A local secondary index shares provisioned throughput settings for read and write activity with the table it is indexing. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-indexes-general.html
upvoted 12 times
...
mrbig00
Most Recent 2 years, 5 months ago
Selected Answer: A
The correct answer is A. A global secondary index (GSI) with Product ID as the partition key and Product Rating as the sort key. A global secondary index (GSI) is a type of index in DynamoDB that has a different partition key than the table. In this case, the GSI should have Product ID as the partition key and Product Rating as the sort key. This will allow the GSI to be queried efficiently for the 10 reviews with the highest rating for a given product. Option B is incorrect because it does not include the Product Rating as the sort key, which is necessary for the query. Option C is incorrect because it uses a local secondary index (LSI), which can only be queried by the table's partition key and the LSI's sort key. Option D is incorrect because it uses the Review ID as the partition key, which is not relevant for the query.
upvoted 4 times
...
k1kavi1
2 years, 5 months ago
Selected Answer: A
Going with A
upvoted 3 times
...
michaldavid
2 years, 5 months ago
Selected Answer: A
AAAAAA
upvoted 4 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