DynamoDB interview question · Most asked
DynamoDB or a relational database such as Aurora PostgreSQL: how do you decide?
Summary
Choose DynamoDB when access patterns are known and key-based, scale or traffic spikes are large, and you want a serverless operational model. Choose a relational database when you need flexible queries, joins, reporting, complex transactions and constraints, or when access patterns are still evolving.
Longer Answer
Questions to ask: Do we know our queries? Do we need ad-hoc reporting? How large and spiky is the load? Does the team know DynamoDB modelling? How important are strict relational constraints?
Many systems use both: relational for the core domain and reporting, DynamoDB for very high-scale, simple patterns (sessions, events, carts). Serverless relational options (Aurora Serverless, Aurora DSQL) have narrowed the operational gap.
Key Points
- Known key-based patterns + scale: DynamoDB.
- Flexible queries and reporting: relational.
- Team skills matter.
- Using both is common.
Explanation
What interviewers look for
A reasoned decision based on access patterns, scale and team, not hype.
More most-asked DynamoDB questions
- What are DynamoDB Streams, and how are they used?
- Query or Scan: what is the difference, and why avoid Scan?
- What is DynamoDB, and what workloads is it a good fit for?
- What is a hot partition, and how do you avoid one?
- How do you approach data modelling in DynamoDB, and how is it different from relational design?
- Explain partition keys, sort keys and the two kinds of primary key.
- Global secondary index or local secondary index: what is the difference?
- How do conditional writes work, and how do you implement optimistic locking in DynamoDB?