Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
AWS Certified Developer - Associate · AWS
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Suppose you need to retrieve multiple orders, but for different customers: CustomerID OrderID OrderDetails 123 A001 Shoes 456 B002 Laptop 789 C003 Phone Here, the partition keys are different (123, 456, 789). A Query won't work because it can only retrieve items for one partition key at a time. BatchGetItem is the best choice because it allows retrieving specific items across multiple partition keys in a single API call.
B) Eliminated - The GetItem API retrieves only one specific item at a time by its primary key. C) Eliminated - The Scan API retrieves all items in a table or index by sequentially scanning every item. D) Eliminated - The Query API retrieves all items that match a specific partition key and optionally filters them by sort key or other criteria.
CustomerID OrderID OrderDetails 123 A001 Shoes 123 A002 Jacket 123 A003 Watch If you need to retrieve all orders for CustomerID = 123, a Query would work well because all the needed items share the same partition key