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

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

A calendar application gives users the ability to schedule and share events. The application stores its data in several Amazon DynamoDB tables. The Events table stores all events for the application. The Events table has a primary key in which the partition key is the date of the event and the sort key is the user’s unique ID number.

A developer is working on a dashboard that will show each user all the details for all their events scheduled on a single day. The developer needs to get the data from the Events table.

What should the developer do to get the relevant data MOST efficiently?

  • A. Perform a scan on the Events table by using the partition key and the sort key as filter expressions.
  • B. Perform a query on the Events table by using the partition key and the sort key as filter expressions.
  • C. Perform a scan on the Events table by using the partition key and the sort key in a key condition expression.
  • D. Perform a query on the Events table by using the partition key and the sort key in a key condition expression.
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
sdafadsfa
2 years, 1 month ago
Selected Answer: B
I checked to my own program to solve questions answer is B
upvoted 1 times
...
by116549
2 years, 4 months ago
- Not A or C as scans are more intensive than a query. This leaves B or D. - With B a filter expression is applied after a Query finishes, but before the results are returned. Therefore, a Query consumes the same amount of read capacity, regardless of whether a filter expression is present. - D looks the best choice
upvoted 1 times
...
michaldavid
2 years, 5 months ago
Selected Answer: D
DDDDDDD
upvoted 1 times
...
DrCloud
2 years, 5 months ago
Selected Answer: D
Key condition expressions for query: To specify the search criteria, you use a key condition expression—a string that determines the items to be read from the table or index. You must specify the partition key name and value as an equality condition. You cannot use a non-key attribute in a Key Condition Expression. You can optionally provide a second condition for the sort key (if present). https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.KeyConditionExpressions
upvoted 1 times
...
k1kavi1
2 years, 5 months ago
Selected Answer: D
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.KeyConditions.html
upvoted 2 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