AWS Certified Cloud Practitioner / Databases & Analytics

DocumentDB Overview

πŸ“„ Amazon DocumentDB

Not all apps fit rows and columns β€” many use flexible, document-based data like JSON.

DocumentDB is AWS's fully managed NoSQL document database, compatible with MongoDB β€” run MongoDB workloads on AWS without managing infrastructure.


🎯 Exam Tip

  • βœ… DocumentDB = NoSQL document database

  • βœ… Compatible with MongoDB

  • βœ… Stores JSON document data

  • βœ… Fully managed, highly available

  • βœ… "MongoDB" β†’ DocumentDB

  • βœ… "NoSQL database" β†’ could be DocumentDB or DynamoDB, depending on the use case


🧠 Core Idea

Just as Aurora is AWS's cloud-native take on MySQL/PostgreSQL, DocumentDB is AWS's managed service compatible with MongoDB.

Database Technology

AWS Managed Service

MySQL / PostgreSQL

Amazon Aurora

MongoDB

Amazon DocumentDB

AWS handles infrastructure, backups, availability, and scaling β€” you focus on the app.


πŸ“„ What is MongoDB?

One of the world's most popular NoSQL document databases β€” stores data as JSON-like documents instead of rows/columns.

{ "customer": "Diya", "country": "India", "sales": 120 }

Each document can have a different structure β€” far more flexible than relational tables. DocumentDB is built to be MongoDB-compatible, so many MongoDB apps migrate with minimal changes.


πŸ“¦ Storing JSON Documents

DocumentDB stores collections of JSON documents instead of tables:

Customers Collection
{ "name": "Diya", "country": "India", "sales": 120 }
{ "name": "Bob", "country": "USA", "sales": 95 }
{ "name": "Carol", "country": "France", "sales": 210 }

Store, retrieve, query, and index these documents easily.


βš™οΈ Key Features

  • βœ… Fully managed by AWS

  • βœ… MongoDB-compatible

  • βœ… Highly available

  • βœ… Automatic backups

  • βœ… Automatic scaling

  • βœ… High performance

No software installs, patches, or servers to manage.


Like Aurora, data is automatically replicated across three Availability Zones in a Region.

AWS Region
  AZ A β†’ replicates β†’ AZ B β†’ replicates β†’ AZ C

Storage grows in 10 GB increments automatically β€” no manual allocation.

Scales to handle millions of requests per second for high-traffic apps.


πŸ“Œ When to Use DocumentDB

  • Your app uses MongoDB

  • You store JSON documents

  • You need a flexible NoSQL database

  • You need high availability

  • You want automatic scaling with managed infrastructure


πŸ“Œ DocumentDB vs DynamoDB

Both are NoSQL, but built for different jobs:

DocumentDB

DynamoDB

MongoDB-compatible

AWS-native NoSQL

Stores JSON documents

Key-value + document data

Best for MongoDB workloads

Best for highly scalable key-value apps

🎯 Exam shortcut: MongoDB β†’ DocumentDB. AWS-native NoSQL β†’ DynamoDB.


πŸ“ Summary

  • πŸ“„ DocumentDB = fully managed NoSQL document database

  • πŸ”— MongoDB-compatible

  • πŸ—‚οΈ Stores JSON documents, not tables

  • 🌍 Auto-replicated across 3 AZs

  • πŸ“ˆ Storage grows in 10 GB increments

  • πŸš€ Scales to millions of requests/sec

  • 🎯 Exam takeaway: MongoDB β†’ DocumentDB; NoSQL in general β†’ DocumentDB or DynamoDB, depending on scenario