An application stores orders in DynamoDB and must immediately read successful writes in the same AWS Region. It needs lookups of a customer's order by customer ID and order ID, and queries by customer ID ordered by creation time; which designs support these access patterns with strongly consistent reads? (Choose two.)
Choose 2 answers
Show the answer
Correct answersB. Use customer ID and creation time as the table key, and map order IDs to base-table keys for direct reads.E. Use customer ID and order ID as the table key, with a local secondary index sorted by creation time.
AWhy not this: Asynchronous replication can lag behind successful writes, leaving customer-history results temporarily stale.
BWhy this is right: Both access patterns read the base table, which supports strongly consistent reads when requested.
CWhy not this: Global secondary indexes support only eventually consistent reads, so customer-history queries cannot meet the freshness requirement.
DWhy not this: DAX query-cache results are eventually consistent and cannot ensure immediate visibility of successful writes.
EWhy this is right: Lookups use the full customer ID and order ID key, and the local secondary index supports strongly consistent customer-history queries.
DynamoDB supports strongly consistent reads on base tables and local secondary indexes. A mapped base-table lookup and a local secondary index can therefore meet the requirements; global secondary indexes support only eventually consistent reads.