When would you choose DynamoDB over a relational database, and how does partition key design affect performance?
What they are really testing: Whether you understand the access-pattern-first model and the hot-partition trap, the difference between someone who has run DynamoDB at scale and someone who has only read about it.
A real interview question
When would you choose DynamoDB over a relational database, and how does partition key design affect performance?
What most people say
drag me
“DynamoDB is a NoSQL database that scales automatically, so use it when you need a database that handles a lot of traffic.”
It is a vague "it scales" pitch. It misses the access-pattern-first modeling and the partition-key/hot-partition reality, which is where DynamoDB projects succeed or fail.
The follow-ups they ask next
Your DynamoDB table throttles under load even though provisioned capacity looks adequate. What is the likely cause?
A hot partition: a skewed partition key concentrates traffic on one partition whose share of capacity is exceeded. Fix by choosing a higher-cardinality key or adding a sharding suffix to spread writes.
What kind of workload should stay on a relational database instead?
Ad-hoc querying, complex joins, multi-row transactions, and reporting/analytics. DynamoDB is optimized for predefined access patterns, not flexible querying.
What the interviewer is listening for
- Access-pattern-first modeling / single-table
- Explains partition key distribution + hot partitions
- Knows when relational is the better choice
What sinks the answer
- Just "NoSQL that scales"
- Unaware of hot partitions
- Would use it for ad-hoc queries/joins
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“Pick DynamoDB for [known high-volume access patterns needing single-digit-ms latency at scale, not ad-hoc queries/joins]. You [model around access patterns up front, often single-table with composite keys + GSIs]. The [partition key drives distribution]: [high-cardinality spreads load, a skewed key creates a hot partition that throttles]. Use [on-demand vs provisioned, eventual vs strong reads].”
Keep going with aws
Foundation
What are the EC2 purchasing options (On-Demand, Reserved, Savings Plans, Spot), and how do you mix them?
Foundation
Walk me through the main S3 storage classes and how you would use lifecycle policies to control cost.
Junior
How does AWS decide whether an IAM request is allowed? Explain the evaluation logic.
Junior
How does an EC2 Auto Scaling Group work, and how would you configure it to scale on load?
Mid
How do you choose between SQS, SNS, EventBridge, and Kinesis?
Mid
What are VPC endpoints, and when would you use a gateway endpoint versus an interface endpoint?
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free