AWS Certified Database – Specialty — Question 119
A company is releasing a new mobile game featuring a team play mode. As a group of mobile device users play together, an item containing their statuses is updated in an Amazon DynamoDB table. Periodically, the other users' devices read the latest statuses of their teammates from the table using the BatchGetltemn operation.
Prior to launch, some testers submitted bug reports claiming that the status data they were seeing in the game was not up-to-date. The developers are unable to replicate this issue and have asked a database specialist for a recommendation.
Which recommendation would resolve this issue?
Answer options
- A. Ensure the DynamoDB table is configured to be always consistent.
- B. Ensure the BatchGetltem operation is called with the ConsistentRead parameter set to false.
- C. Enable a stream on the DynamoDB table and subscribe each device to the stream to ensure all devices receive up-to-date status information.
- D. Ensure the BatchGetltem operation is called with the ConsistentRead parameter set to true.
Correct answer: D
Explanation
The correct answer is D because setting the ConsistentRead parameter to true ensures that the latest data is retrieved directly from the DynamoDB table, thus resolving the issue of outdated status information. Option A is incorrect as always consistent reads are not possible in DynamoDB; it has eventual consistency by default. Option B would lead to reading stale data, which is not the desired outcome. Option C, while helpful for real-time updates, does not directly address the issue reported by testers related to the BatchGetItem operation.