Which Partition Key Optimizes DynamoDB Performance for a Pet Store Rewards App?
Short answer
A A randomly generated universally unique identifier (UUID)
Question
Key Takeaways
This question tests your understanding of DynamoDB partition key design, where high-cardinality, evenly distributed keys prevent throttling; the trap is choosing a key with low cardinality or natural duplicates.
For a DynamoDB table storing customer rewards points, using a randomly generated UUID as the partition key is the optimal choice to avoid hot partitions and ensure even data distribution, according to the community and AWS best practices.
Common mistake: Choosing B (customer's full name) or C (signup date) is common because they seem intuitive, but these keys can cause uneven access patterns and duplicate values, leading to hot partitions and poor performance.
Expert Analysis
Why the Answer Is Correct
Option A (randomly generated UUID) provides a unique, uniformly distributed partition key. Each customer gets a distinct identifier, ensuring that data is spread evenly across all partitions. This avoids the risk of one partition becoming a hotspot, which is critical for optimizing query performance and limiting partition overload. The community comment [1] correctly points out that names, dates, and pet names can all be duplicated, making them poor choices.
Why the Other Options Are Wrong
- B: Customer's full name — Not unique; multiple customers can share the same name, causing collisions and uneven data distribution. Comment [1] gives the example of two John Smiths.
- C: Date when the customer signed up — Very low cardinality; all customers signed up on the same date would go to the same partition, creating a hot partition. Comment [1] also notes this scenario.
- D: Name of the customer's pet — Even less unique; many pets share common names, and the same pet name can easily occur, leading to skewed partitions. Comment [1] highlights the same issue.
Community Comment Notes
Comment [3] suggests thinking of the UUID as a CustomerID, which is a useful mental model. Comment [4] simply agrees with A. Comment [2] mentions 'start date' but that corresponds to option C, which is not recommended; the overall voting and explanation strongly favor A. The community consensus is that a high-cardinality, randomly generated key is the only robust choice.
Official Reference
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/partition-key-design.html
- https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-uniform-load.html
- https://aws.amazon.com/blogs/database/choosing-the-right-dynamodb-partition-key/
These links open the official vendor documentation in a new tab.
Exam Strategy
When asked about DynamoDB partition keys, always evaluate cardinality and distribution. A high-cardinality, randomly generated key (like a UUID) is usually the safest answer. Beware of natural attributes like names or dates—they often fail the uniqueness and uniform access pattern test.
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 4 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 4
-
DeaconStJohn 👍 2 Answered AThis is the only feasible option for a partition key.. B - Two John Smith's sign up for the programme C - Both John Smith's signed up on the same day D - Both John Smith's signed up on the same day with a poodle called Betsy May. Cant rule it out.
-
KarBiswa 👍 1 Answered CThe start date for the rewards program
-
trungtd 👍 3 Answered AThink of it as CustomerID
-
65703c1 👍 2 Answered AA is the correct answer.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →