AWS Certified Developer Associate DVA-C01 – Question359

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.

Correct Answer: D