Which Partition Key Optimizes DynamoDB Performance for a Pet Store Rewards App?
A developer is creating a new application for a pet store. The application will manage customer rewards points. The developer will use Amazon DynamoDB to store the data for the application. The developer needs to optimize query performance and limit partition overload before actual performance analysis. Which option should the developer use for a partition key to meet these requirements?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
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.
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.
Community Discussion (4 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
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
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.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →