Search⌘ K
AI Features

Introduction to Amazon DocumentDB

Explore Amazon DocumentDB's document model and cluster architecture, understand how it scales and manages failover with shared storage, and learn about its backup and restore capabilities. This lesson helps you grasp key operational concepts for running MongoDB-compatible document workloads on AWS without managing database infrastructure.

Amazon DocumentDB occupies a specific position in the AWS database portfolio. It serves teams that need MongoDB-compatible document workloads without the operational overhead of managing MongoDB servers, replica sets, sharding, patching, and backup infrastructure. Understanding where DocumentDB fits, how its cluster architecture works, and how it protects data is foundational knowledge for anyone working with AWS databases. This lesson walks through the document data model, the internal building blocks of a DocumentDB cluster, the endpoint abstraction that simplifies connectivity, replica-based read scaling and failover mechanics, and the backup and restore capabilities that protect data from the moment a cluster is created.

DocumentDB is a fully managed, MongoDB-compatible document database service purpose-built for storing, querying, and indexing JSON-like documents at scale. AWS operates the underlying infrastructure, handling provisioning, patching, backup, and failover so that application teams can focus on data modeling and query logic rather than server administration. DocumentDB achieves MongoDB compatibility by emulating the MongoDB 3.6, 4.0, 5.0, and 8.0 APIs, which means existing MongoDB drivers, tools, and application code work with minimal changes when migrating to DocumentDB.

A common source of confusion is the distinction between DocumentDB and other AWS database services. Amazon DynamoDB is a key-value and document NoSQL service, but it uses a fundamentally different access pattern based on partition keys, sort keys, and single-digit-millisecond lookups at any scale. Amazon RDS and Aurora target relational workloads that depend on SQL joins, foreign keys, and strict schemas. DocumentDB fills the gap for teams that need flexible document schemas and rich query capabilities, including nested field queries and aggregation pipelines, with a managed MongoDB-compatible API layer.

Attention: DocumentDB is not a drop-in replacement for every MongoDB feature. It emulates the MongoDB API but does not support all MongoDB server-side features, such as client-side field-level encryption or certain aggregation operators. Always check the compatibility matrix before migrating.

The sections that follow explore the document model, cluster architecture, endpoints, read scaling, and backup fundamentals that form the operational foundation of every DocumentDB deployment.

The document model and JSON thinking

Relational databases organize data into tables with fixed columns, and ...