easymultiple choiceObjective-mapped

A new feature stores user events in DynamoDB. Each event must be fetched by user_id and sorted by event_time. The team expects many different users and wants to avoid a single hot partition. Which partition key design is best?

Question 1easymultiple choice
Full question →

A new feature stores user events in DynamoDB. Each event must be fetched by user_id and sorted by event_time. The team expects many different users and wants to avoid a single hot partition. Which partition key design is best?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Use a constant partition key value (for example, partition_key='events') and store user_id as an attribute.

A constant partition key would concentrate all events into one partition, creating a hot partition risk. Queries by user_id would not be efficient without redesign and could exceed throughput limits. It defeats horizontal distribution.

B

Best answer

Use user_id as the partition key and event_time as the sort key.

Using user_id as the partition key spreads data across many partitions based on user distribution. event_time as the sort key supports efficient range queries and retrieving events in time order per user. This design matches the stated access pattern and reduces hot partition likelihood.

C

Distractor review

Use event_time as the partition key and user_id as an attribute to query later.

Partitioning by event_time can still create hotspots if many events share the same time buckets. It also makes queries by user_id inefficient because user_id is not the partition key. The access pattern says user_id must drive retrieval.

D

Distractor review

Use a randomly generated UUID as the partition key and query by user_id using a full table scan.

A UUID partition key prevents efficient direct lookups by user_id and forces scans, which are slow and costly at scale. Full table scans do not meet typical performance needs. The design should align partition key with the query pattern.

Common exam trap

Common exam trap: NAT rules depend on direction and matching traffic

NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.

Technical deep dive

How to think about this question

NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.

KKey Concepts to Remember

  • Static NAT maps one inside address to one outside address.
  • PAT allows many inside hosts to share one public address using ports.
  • Inside local and inside global describe the private and translated addresses.
  • NAT ACLs identify traffic for translation, not always security filtering.

TExam Day Tips

  • Identify inside and outside interfaces first.
  • Check whether the scenario needs static NAT, dynamic NAT or PAT.
  • Do not confuse NAT matching ACLs with normal packet-filtering intent.

Related practice questions

Related SAA-C03 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this SAA-C03 question test?

Static NAT maps one inside address to one outside address.

What is the correct answer to this question?

The correct answer is: Use user_id as the partition key and event_time as the sort key. — DynamoDB performance depends heavily on the choice of partition key aligned to access patterns. Because events must be fetched by user_id and returned in event_time order, user_id should be the partition key and event_time should be the sort key. That supports efficient queries for a single user and enables sorted results within that partition. Using a constant partition key would concentrate all traffic into one partition and create hot spots, while UUID partitioning or time-only partitioning makes user-based queries inefficient. Why others are wrong: Option A creates a hot partition because all items share one partition key. Option C partitions by event_time, but the required query is user-centric; queries would be inefficient and could amplify hotspots. Option D forces full table scans to find a user’s events, which is generally unacceptable for performance at scale. Option B directly matches the stated query pattern and distributes load across partitions.

What should I do if I get this SAA-C03 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.