Database

Amazon DocumentDB

View on GitHub

Amazon DocumentDB

A managed, document-oriented database service that is compatible with the MongoDB API and protocol. It operates as a clustered, VPC-based database where AWS manages the underlying service platform and infrastructure while customers run MongoDB drivers and manage schema and queries. It typically fits as the primary document data store for application back ends requiring JSON-like document models.

🗂 Resource Category

Database

🧠 Exam Memory Hook

Think: "Managed document database + MongoDB API compatibility + VPC-based = Amazon DocumentDB"


📖 Ownership

Classification: AWS Managed Service

AWS responsibilities: AWS operates and maintains the underlying physical infrastructure, networking, storage layer, and the managed database platform that implements the MongoDB-compatible API; AWS secures, monitors, and patches the service platform and underlying hosts according to the service maintenance model and provides service control plane functionality. AWS provides built-in integrations for metrics and logs and manages the underlying storage and replication mechanisms used by the service. AWS does not manage customer data models, application code, or client drivers.

Customer responsibilities: The customer configures database instances, parameter groups, security groups and networking, access control (IAM and database users), backup retention windows and maintenance windows, data schema and indexes, query design, and client drivers; the customer secures data access (credentials, roles, network controls), monitors application-level performance and query metrics, and implements application-level encryption if required. The customer is responsible for data integrity, migrations, compatibility testing with MongoDB drivers, and any operational automation that acts on service events.

Patching responsibilities: AWS patches and maintains the physical servers, the hypervisor, and the managed database platform (including the managed runtime and service binaries) according to its maintenance model. The customer does not patch the underlying guest operating system or database engine binaries but is responsible for patching and updating application code, MongoDB client drivers, libraries, and any custom tooling or extensions they deploy.


🏗 Typical Architecture

💡 Top 5 Features

  • MongoDB-compatible API and wire protocol to allow many MongoDB drivers and tools to connect with minimal client changes.
  • Managed clustered deployment model with primary and replica instances to support read scaling and availability patterns.
  • Storage and compute separation where AWS manages the distributed storage layer and its scaling behavior.
  • Encryption at rest support integrated with AWS Key Management Service for customer-managed keys when configured.
  • Integration with Amazon CloudWatch for metrics and logs and support for VPC-based network isolation and security groups.

✅ Top 5 Use Cases

  • Replace or rehost self-managed MongoDB clusters to reduce operational overhead while retaining compatibility with MongoDB drivers.
  • Store semi-structured JSON documents such as user profiles or product catalogs where flexible schema is required.
  • Support read-heavy document workloads using replicas for read scaling from application read replicas or analytics processes.
  • Provide a VPC-isolated document store for regulated workloads that require network isolation and KMS-managed encryption at rest.
  • Use as the primary operational store for content-management and personalization engines that require flexible document schemas.

🏗 Architecture Placement

Amazon DocumentDB is deployed inside a customer VPC as a regional, VPC-based managed document database; application servers (EC2, ECS, or Lambda) inside the VPC send queries using MongoDB drivers, and monitoring systems such as CloudWatch collect metrics and logs. It is used as the primary persistent document store and typically connects to application tiers, analytics jobs, and backup/maintenance automation. Placement and networking are controlled by the customer through VPC subnets and security groups.

🎯 Commonly Used With

- Amazon VPC
- Amazon EC2
- AWS Identity and Access Management
- Amazon CloudWatch
- AWS Lambda

🌍 5 Real-World Examples

  • A financial services application stores customer preference documents in Amazon DocumentDB to allow evolving schemas while keeping the data accessible from microservices in the same VPC.
  • An e-commerce platform uses Amazon DocumentDB for product catalog documents enabling fast iteration of attributes and integration with application servers for search and display.
  • A healthcare app stores semi-structured patient metadata and visit notes in Amazon DocumentDB to support flexible schemas while isolating data inside a VPC and encrypting at rest.
  • A media streaming service stores content metadata and personalization documents in Amazon DocumentDB to support rapid schema changes and integration with recommendation services.
  • A logistics system records shipment events as documents in Amazon DocumentDB to accommodate variable event structures and to provide a consistent API for backend services.

🎓 AWS Exam Clues

  • Connectivity uses the MongoDB wire protocol so existing MongoDB drivers are often reusable with minimal changes.
  • Choose when you want a managed document database and reduced operational responsibility compared with self-hosted MongoDB.
  • Designed to be deployed inside a VPC; network isolation and security groups control access from application tiers.
  • Operational responsibilities include schema design, index tuning, query optimization, and monitoring of database-level metrics.
  • Security considerations include IAM integration, network controls, and KMS-managed encryption keys for data at rest.

📝 Quick Revision

Amazon DocumentDB is a managed, MongoDB-compatible document database deployed inside a VPC and used as a primary JSON-like document store. Use it when you need MongoDB API compatibility with a managed platform, and remember AWS manages the service platform while customers manage schema, drivers, network access, and application-level security and monitoring.

🏷 Keywords

MongoDB-compatibledocument databasewire protocolmanaged clustersread replicasVPC-onlyAWS KMS encryptionCloudWatch metricsparameter groupscluster instancesautomated backupsdriver compatibility