A permit handler runs five separate DynamoDB queries when one keyed access pattern with a wider item (or single query) would suffice. What should the developer change?
Select an answer to reveal the explanation.
Short Explanation
Five trips to the same desk for one permit folder is classic chattiness. Shape the item or the query so one keyed read brings what you need. Fewer round trips, snappier permits.
Full Explanation
A permit handler that runs five separate DynamoDB queries when one keyed access pattern with a wider item (or a single query) would suffice should reduce chatty access by redesigning items or queries so one keyed operation retrieves needed data. Chatty DynamoDB access multiplies latency and capacity consumption for every citizen permit action. Modeling for access patterns is a core Associate data skill.
Adding four more queries so every attribute has its own round trip increases chatter and cost.
Replacing Query with a table Scan on every request for simplicity is far more expensive at scale.
Turning on DynamoDB Streams solely to multiply read traffic does not fix the chatty read pattern.
Exam caveat: Design DynamoDB items and keys around access patterns to minimize round trips.
Operational check: Combine required attributes into the keyed item or a single Query, load-test the permit handler, confirm capacity units and latency drop, and document the access pattern for future schema changes. Keep the civic/municipal context in mind: permit detail pages that fire five queries each create avoidable throttling during filing deadlines. Document the finding in the municipal incident ticket so the next on-call engineer inherits evidence rather than folklore.