Interview Q&A · questions with model answers
DynamoDB Interview Questions
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked Global secondary index or local secondary index: what is the difference?
A GSI has its own partition key and optional sort key, can be added any time, has its own capacity, and is eventually consistent. An LSI keeps the table's partition key with a different sort key,…
-
Most asked Query or Scan: what is the difference, and why avoid Scan?
Query reads one item collection (one partition key value), optionally narrowed by a sort key condition, so it reads only the relevant items. Scan reads every item in the table or index and then…
-
Most asked On-demand or provisioned capacity: how do you choose?
On-demand charges per request and scales automatically, suiting new, unpredictable or spiky workloads. Provisioned capacity (usually with auto scaling, optionally with reserved capacity) is cheaper…
-
What is DAX, and when should you use it?
DynamoDB Accelerator is an in-memory, write-through cache cluster that sits in front of DynamoDB and serves eventually consistent reads in microseconds through a DynamoDB-compatible client. It suits…
-
How do you count or aggregate data in DynamoDB?
There is no COUNT(*) or GROUP BY over a table. Maintain aggregates yourself: update counters in the same transaction as the write, or consume DynamoDB Streams to update aggregate items…
-
How does DynamoDB compare with MongoDB and Cassandra?
All three are non-relational, but DynamoDB is a fully managed AWS service with key-based access and per-request pricing; MongoDB is a document database with rich ad-hoc queries, secondary indexes…