DynamoDB Interview Questions (Top 100 Questions with Answers)

Master Amazon DynamoDB Interview Questions with production-oriented questions covering DynamoDB Architecture, Partitions, Primary Keys, GSIs, LSIs, Streams, Transactions, Scaling, Performance Tuning, and real-world production scenarios.

Introduction

Amazon DynamoDB is AWS's fully managed NoSQL database service.

It provides

  • Single-digit millisecond latency
  • Automatic scaling
  • High availability
  • Serverless operations
  • Multi-region replication
  • Built-in security

It is widely used in

  • Banking
  • Gaming
  • IoT
  • E-Commerce
  • Social Media
  • Recommendation Systems
  • Real-time Analytics

Major companies using DynamoDB include

  • Amazon
  • Airbnb
  • Samsung
  • Snap
  • Lyft
  • Zoom
  • Toyota
  • Capital One

This guide contains the Top 100 DynamoDB Interview Questions frequently asked in AWS, Java, Backend, Cloud, DevOps, and Solution Architect interviews.


DynamoDB Interview Roadmap

DynamoDB Basics
       │
       ▼
Architecture
       │
       ▼
Primary Keys
       │
       ▼
Indexes
       │
       ▼
Partitions
       │
       ▼
Scaling
       │
       ▼
Streams
       │
       ▼
Transactions
       │
       ▼
Performance

DynamoDB Fundamentals

1. What is DynamoDB?

Amazon DynamoDB is a fully managed NoSQL key-value and document database.


2. Why DynamoDB?

  • Serverless
  • Highly Available
  • Auto Scaling
  • Millisecond Latency
  • Managed Service
  • Integrated with AWS

3. SQL Database vs DynamoDB?

SQL DynamoDB
Tables Tables
Rows Items
Columns Attributes
JOIN Not Supported
Fixed Schema Flexible Schema

4. DynamoDB vs MongoDB?

DynamoDB MongoDB
Managed AWS Service Self Managed / Atlas
Auto Scaling Manual Scaling Options
Integrated with AWS Vendor Independent

5. Common Use Cases?

  • Shopping Cart
  • User Profiles
  • Session Store
  • IoT
  • Gaming
  • Leaderboards

Architecture

6. Explain DynamoDB Architecture.

Main Components

  • Tables
  • Partitions
  • Items
  • Attributes
  • SSD Storage

7. What is a Table?

Collection of items.


8. What is an Item?

Equivalent to a row.


9. What is an Attribute?

Equivalent to a column.


10. Maximum Item Size?

400 KB


Primary Keys

11. Partition Key?

Single attribute.

Determines data location.


12. Composite Primary Key?

Partition Key

Sort Key.


13. Sort Key?

Groups related items together.


14. Good Partition Key?

  • High Cardinality
  • Even Distribution
  • Frequently Queried

15. Bad Partition Key?

Low Cardinality.

Creates Hot Partitions.


Partitions

16. What is a Partition?

Physical storage unit.


17. How is Data Distributed?

Hash of Partition Key.


18. What is a Hot Partition?

One partition receiving excessive traffic.


19. Partition Split?

Automatic.


20. Can users manage partitions?

No.

AWS manages them.


Secondary Indexes

21. What is GSI?

Global Secondary Index.

Different partition key allowed.


22. What is LSI?

Local Secondary Index.

Same partition key.

Different sort key.


23. GSI vs LSI?

GSI LSI
Different Partition Key Same Partition Key
Created Anytime Created During Table Creation
Separate Capacity Shares Table Capacity (Provisioned Mode)

24. Sparse Index?

Indexes only items containing indexed attributes.


25. Why use Secondary Indexes?

Query flexibility.


Read & Write Capacity

26. What is RCU?

Read Capacity Unit.


27. What is WCU?

Write Capacity Unit.


28. Provisioned Mode?

Predefined throughput.


29. On-Demand Mode?

Automatic scaling.

Pay per request.


30. Auto Scaling?

Automatically adjusts provisioned capacity.


Queries

31. Query Operation?

Searches using Partition Key.


32. Scan Operation?

Reads entire table.


33. Query vs Scan?

Query Scan
Fast Slow
Indexed Entire Table
Preferred Avoid if Possible

34. Filter Expression?

Filters after reading items.


35. Projection Expression?

Returns selected attributes.


Consistency

36. Eventual Consistency?

Default.


37. Strong Consistency?

Optional for tables and LSIs in the same Region.


38. Which is Faster?

Eventually Consistent Reads.


39. ConsistentRead Parameter?

Requests strongly consistent reads where supported.


40. Does GSI support Strong Consistency?

No.

GSIs always provide eventually consistent reads.


Transactions

41. Does DynamoDB support Transactions?

Yes.


42. Transaction APIs?

  • TransactWriteItems
  • TransactGetItems

43. ACID Support?

Supported within DynamoDB transactions.


44. Conditional Write?

Supported.


45. Optimistic Locking?

Supported using Version Attributes.


Streams

46. What are DynamoDB Streams?

Captures item changes.


47. Stream Events?

  • INSERT
  • MODIFY
  • REMOVE

48. Common Uses?

  • Lambda
  • Audit
  • Event Processing

49. Stream Retention?

Up to 24 hours.


50. Lambda Integration?

Native.


Backup

51. Point-in-Time Recovery?

Supported.


52. On-Demand Backup?

Supported.


53. Restore?

Creates a new table.


54. Export to S3?

Supported.


55. Import from S3?

Supported.


Global Tables

56. What are Global Tables?

Multi-region replication.


57. Advantages?

  • Low Latency
  • Disaster Recovery
  • Multi Region

58. Conflict Resolution?

Last writer wins.


59. Multi Active?

Yes.


60. Disaster Recovery?

Built-in.


Security

61. IAM Integration?

Yes.


62. Encryption?

AWS KMS.


63. VPC Endpoint?

Supported.


64. Fine-Grained Access?

Supported using IAM policies.


65. Audit?

CloudTrail integration.


Performance

66. Why is DynamoDB Fast?

SSD

Partitioning

Distributed Architecture.


67. Adaptive Capacity?

Automatically reallocates throughput to busy partitions.


68. DAX?

DynamoDB Accelerator.

In-memory cache.


69. Batch Operations?

  • BatchGetItem
  • BatchWriteItem

70. Pagination?

Uses LastEvaluatedKey.


TTL

71. What is TTL?

Time To Live.


72. TTL Use Cases?

  • Sessions
  • Cache
  • Temporary Data

73. Immediate Deletion?

No.

Deletion is asynchronous.


74. TTL Charges?

Deletion itself is free, but replicated deletes on Global Tables consume replicated write capacity.


75. TTL with Streams?

Delete events can appear in Streams.


Production Scenarios

76. High Latency?

Check

  • Hot Partitions
  • DAX
  • Query Design

77. Hot Partition?

Improve Partition Key.


78. Throttling?

Increase Capacity

or

Use On-Demand.


79. Slow Scan?

Use Query instead.


80. Expensive Queries?

Use GSI.


81. Frequent Writes?

Use BatchWriteItem.


82. Global Users?

Use Global Tables.


83. Audit Changes?

Use Streams.


84. Cache Frequently Read Data?

Use DAX.


85. Archive Data?

TTL

Streams

S3.


Senior-Level Questions

86. DynamoDB vs Cassandra?

Managed

vs

Self Managed.


87. DynamoDB vs MongoDB?

Key-Value

vs

Document Database.


88. DynamoDB vs Redis?

Persistent

vs

Memory.


89. DynamoDB vs Aurora?

NoSQL

vs

Relational.


90. CAP Theorem?

DynamoDB favors Availability and Partition Tolerance, while allowing developers to choose between eventual and strong consistency for supported reads.


91. Explain Partition Internals.

Hash

Partition

SSD.


92. Explain GSI Internals.

Separate storage

Separate partitioning

Eventually consistent.


93. Explain Adaptive Capacity.

Automatically shifts throughput to frequently accessed partitions.


94. Explain DAX Internals.

Read-through and write-through cache reducing read latency to microseconds.


95. Explain Streams Internals.

Change log

Lambda

Event Processing.


96. Best Monitoring Tools?

  • CloudWatch
  • CloudTrail
  • AWS X-Ray
  • AWS Console

97. Common Production Problems?

  • Hot Partitions
  • Throttling
  • Poor Partition Keys
  • Full Table Scans

98. Best Design Practices?

  • Good Partition Keys
  • GSIs
  • On-Demand Scaling
  • Batch APIs

99. What should be monitored?

  • Throttled Requests
  • Latency
  • Consumed RCU/WCU
  • Errors
  • Capacity Utilization

100. DynamoDB Performance Checklist?

  • Good Partition Key
  • Query Instead of Scan
  • Use GSI
  • DAX
  • Batch Operations
  • Auto Scaling
  • Adaptive Capacity
  • TTL
  • Streams

DynamoDB Request Workflow

Application
      │
      ▼
AWS SDK
      │
      ▼
DynamoDB
      │
      ▼
Partition Key Hash
      │
      ▼
Partition
      │
      ▼
SSD Storage
      │
      ▼
Response

Quick Revision

Area Focus
Storage Items, Attributes
Primary Keys Partition + Sort Key
Indexes GSI, LSI
Reads Query
Avoid Scan
Capacity RCU, WCU
Scaling Auto Scaling
Events Streams
Cache DAX
Multi Region Global Tables

Interview Tips

During DynamoDB interviews

  • Explain the difference between Partition Key and Sort Key.
  • Understand how partition keys affect scalability.
  • Explain GSI vs LSI with real-world examples.
  • Mention Query instead of Scan for performance.
  • Understand RCU, WCU, and capacity modes.
  • Explain Streams, Lambda, and event-driven architectures.
  • Discuss Global Tables, DAX, Adaptive Capacity, and TTL.
  • Relate DynamoDB concepts to AWS microservices and serverless applications.

Summary

Amazon DynamoDB is a fully managed, highly scalable NoSQL database built for cloud-native applications. Strong DynamoDB interview performance requires understanding primary keys, partitioning, secondary indexes, capacity units, transactions, Streams, Global Tables, DAX, Adaptive Capacity, and performance tuning.

Mastering these 100 DynamoDB interview questions prepares you for AWS Developer, Backend Engineer, Java Developer, DevOps Engineer, Solution Architect, and Cloud Architect interviews.