61.2k views
3 votes
How do you get a strongly consistent read in DynamoDB?

(A) Set the Consistent Read parameter to true in your read request.
(B) Use a global secondary index.
(C) Use a DynamoDB stream.
(D) All of the above.

1 Answer

4 votes

Final answer:

The correct answer is (A) Set the Consistent Read parameter to true in your read request. DynamoDB provides eventual consistency by default, but setting the Consistent Read parameter to true ensures strongly consistent reads.

Step-by-step explanation:

The correct answer is (A) Set the Consistent Read parameter to true in your read request.

DynamoDB provides eventual consistency by default, which means that a read operation may not reflect the latest write data. However, if you want to get a strongly consistent read, you can set the Consistent Read parameter to true in your read request. This ensures that the read operation will return the most up-to-date data.

Using a global secondary index (option B) or a DynamoDB stream (option C) does not directly guarantee strongly consistent reads. Both of these features can be used for different purposes, but for strongly consistent reads, you should focus on option A.

User RMPR
by
8.1k points