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?

  1. A randomly generated universally unique identifier (UUID) Source Reference Answer
  2. The customer's full name
  3. The date when the customer signed up for the rewards program
  4. The name of the customer's pet

Community Votes

A
100%

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)

65703c1 👍 2 Selected: A
A is the correct answer.
trungtd 👍 3 Selected: A
Think of it as CustomerID
DeaconStJohn 👍 2 Selected: A
This 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 Selected: C
The start date for the rewards program

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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 →

← Back to DVA-C02 Study Guide