Skip to the content.

DynamoDB is Amazon’s fully managed NoSQL database service offered on AWS. Here’s a breakdown for you:

🔹 Key Points

🔹 Core Concepts

  1. Table → Collection of items (like a relational table, but schema-less).
  2. Item → A single record (like a row).
  3. Attribute → A field within an item (like a column).
  4. Primary key → Uniquely identifies each item. Can be:

    • Partition key (hash key)
    • Partition key + sort key (composite key)

🔹 Features

🔹 When to Use

👉 Think of it as AWS’s alternative to MongoDB, but fully managed, auto-scaled, and tightly integrated with AWS services.


🔹 DynamoDB vs PostgreSQL/MySQL

Feature DynamoDB (NoSQL) PostgreSQL / MySQL (Relational SQL)
Data Model Key–Value + Document (flexible schema, items can differ) Tables with rows & fixed schema (columns defined upfront)
Schema Schema-less (dynamic attributes per item) Strict schema (tables/columns must be predefined)
Querying Key-based lookups, indexes (LSI, GSI), limited querying Rich querying with SQL (joins, group by, aggregations, complex filters)
Transactions Supports ACID transactions, but limited compared to RDBMS Strong ACID compliance, complex multi-row transactions
Scaling Horizontal scaling built-in (auto-sharding, partitions) Vertical scaling mostly (bigger server) or manual sharding/replication
Performance Ultra-low latency (single-digit ms), predictable Slower under massive scale (depends on hardware and optimization)
Joins Not supported (must denormalize or manage manually) Fully supported (inner, outer, cross joins, etc.)
Best For High-scale apps with simple access patterns (e.g., user sessions, IoT, shopping cart, social feeds) Applications needing rich queries, relationships, and data consistency (banking, ERP, analytics)
Hosting Managed by AWS (no server mgmt, auto scaling, backups, HA) Can be self-hosted or managed (AWS RDS, Cloud SQL, etc.)
Cost Model Pay-per-request or provisioned throughput (depends on read/write ops) Pay for compute & storage (usually instance-based)

🔹 When to Choose


👉 Simple rule of thumb: