HAQM DocumentDB (with MongoDB compatibility) is a document database service that is purpose-built for JSON data management at scale, fully managed and integrated with AWS, and enterprise-ready with high durability. This scalable service offers customers the durability needed when operating mission-critical MongoDB workloads.

In HAQM DocumentDB, storage scales automatically up to 128 TiB in Instance-based Clusters, and 4 PiB in HAQM DocumentDB Elastic Clusters, with little to no impact to your application. HAQM DocumentDB supports millions of requests per second with up to 15 low latency read replicas in minutes, without any application downtime, regardless of the size of your data.

HAQM DocumentDB offers 99.9% SLA and makes your data durable across three Availability Zones (AZs) within a Region by replicating new writes six ways to ensure your data remains readable in the rare occurrence of a full AZ failure plus an additional concurrent storage node failure in a different AZ. By replicating new writes six ways, HAQM DocumentDB is resilient to failures and ensures zero data loss failovers within a Region. Customers only pay for one copy of storage.

Customers can use AWS Database Migration Service (DMS) to easily migrate your self-managed MongoDB databases to HAQM DocumentDB with virtually no downtime.

Performance at scale

HAQM DocumentDB Elastic Clusters

HAQM DocumentDB Elastic Clusters enables customers to handle millions of writes and reads per second, allowing customers to scale their document databases in minutes with little to no downtime or impact to performance. Customers can also store petabytes of data and only pay for the capacity they consume with zero management of underlying infrastructure. With HAQM DocumentDB Elastic Clusters customers can now meet the scaling needs of virtually any application. 

HAQM DocumentDB Elastic Clusters

High throughput, low latency for document queries

HAQM DocumentDB has a flexible JSON document model, data types, and efficient indexing. The service uses a scale-up, in-memory optimized architecture to allow for fast query evaluation over large documents sets.

Easy scaling of database compute resources

With a few clicks in the AWS Management Console, customers can scale the compute and memory resources up or down by creating new replica instances of the desired size or by removing instances. Compute scaling operations typically complete in a few minutes.

Automatic storage scaling

HAQM DocumentDB will automatically grow the size of the storage volume as your cluster storage needs grow. The storage volume will grow in increments of 10 GB up to a maximum of 4 PiB. Customers don't need to provision excess storage for your document database to handle future growth.

Low latency read replicas

Increase read throughput to support high volume application requests by creating up to 15 database read replicas. HAQM DocumentDB replicas share the same underlying storage as the source instance, lowering costs and avoiding the need to perform writes at the replica nodes. This frees up more processing power to serve read requests and reduces the replica lag time–often down to single digit milliseconds. HAQM DocumentDB also provides a single endpoint for read queries, so the application can connect without the need to keep track of replicas as they are added and removed.

MongoDB-compatible

HAQM DocumentDB is compatible with MongoDB 3.6, 4.0, and 5.0 drivers and tools. A vast majority of the applications, drivers, and tools that customers already use today with their open-source MongoDB non-relational database can be used with HAQM DocumentDB. HAQM DocumentDB emulates the responses that a client expects from a MongoDB server by implementing the Apache 2.0 open source MongoDB 3.6, 4.0, and 5.0 APIs on a purpose-built, distributed, fault-tolerant, and self-healing storage system that gives customers the performance, scalability, and availability they need when operating mission-critical MongoDB workloads at scale. Learn more about supported MongoDB APIs.

Geospatial query capabilities

The launch of Geospatial query capabilities enables customers to use HAQM DocumentDB to support storing, querying and indexing Geospatial data. Customers can create 2dsphere indexes and use popular MongoDB geospatial APIs such as $nearSphere, $geoNear, $minDistance, $maxDistance to perform queries stored on data stored DocumentDB.

ACID transactions

ACID (atomicity, consistency, isolation, durability) is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps. With the launch of support for MongoDB 4.0 compatibility, HAQM DocumentDB supports the ability to perform ACID transactions across multiple documents, statements, collections, and databases.

Migration support

Customers can easily migrate their MongoDB databases on-premises or on HAQM Elastic Compute Cloud (EC2) to HAQM DocumentDB with virtually no downtime using the AWS Database Migration Service (DMS). With DMS, customers can migrate from a MongoDB replica set or from a sharded cluster to HAQM DocumentDB. For more information about migrating both relational and non-relational databases to HAQM DocumentDB, see Migrating to HAQM DocumentDB.

Cost effective

Pay only for what you use

There is no upfront commitment with HAQM DocumentDB. You pay an hourly charge for each instance that you launch, and when you’re finished with an HAQM DocumentDB instance, you can delete or pause it. You do not need to overprovision storage as a safety margin, and you only pay for the storage you actually consume. To see more details, visit the HAQM DocumentDB pricing page.

Price predictability at any scale

HAQM DocumentDB offers I/O-Optimized storage configuration for those seeking price predictability. HAQM DocumentDB I/O-Optimized offers up to 40% cost savings for I/O-intensive applications where I/O charges exceed 25% of the total HAQM DocumentDB I/O-Optimized database spend. With HAQM DocumentDB I/O-Optimized, you can effectively eliminate the uncertainty of variable I/O charges from your billing structure. Instead, you are billed only for compute, storage, and backup charges, ensuring price predictability and transparency.

Price-performance

HAQM DocumentDB enables you to choose between Standard and I/O-Optimized storage configurations for your database cluster. The flexibility enables you to maximize price-performance by choosing the appropriate configuration based on your needs. If your application requires low to moderate I/O consumption, you should choose Standard configuration. If your use case demands I/O intensive workloads then you can opt for I/O-Optimized storage configuration.

Fully Managed

Automatic provisioning and setup

Getting started with HAQM DocumentDB is easy. Just launch a new HAQM DocumentDB cluster using the AWS Management Console. HAQM DocumentDB instances are pre-configured with parameters and settings appropriate for the instance class selected. Customers can launch a cluster and connect the application within minutes without additional configuration.

Monitoring and metrics

HAQM DocumentDB provides HAQM CloudWatch metrics for the cloud database instances. Customers can use the AWS Management Console to view over 40 key operational metrics for the cluster, including compute, memory, storage, query throughput, MongoDB opcounters, and active connections.

Automatic software patching

HAQM DocumentDB will keep customers database up-to-date with the latest patches. Customers can control if and when the cluster is patched via Database Engine Version Management.

Highly Secure and Compliant

Network isolation

HAQM DocumentDB runs in HAQM Virtual Private Cloud (VPC), which allows customers to isolate the cluster in the virtual network and connect to on-premises IT infrastructure using industry- standard encrypted IPsec virtual private networks (VPNs). In addition, using HAQM DocumentDB’s VPC configuration, customers can configure firewall settings and control network access to the cluster.

Authorization

HAQM DocumentDB supports role-based access control (RBAC) with built-in roles and defined roles. RBAC enables customers to enforce least privilege as a best practice by restricting the actions that users are authorized to perform. HAQM DocumentDB is integrated with AWS Identity and Access Management (IAM) and provides customers the ability to control the actions that AWS IAM users and groups can take on specific HAQM DocumentDB resources, including clusters, instances, snapshots, and parameter groups. In addition, tag the HAQM DocumentDB resources, and control the actions that the IAM users and groups can take on groups of resources that have the same tag (and tag value).

Encryption

HAQM DocumentDB allows customers to encrypt databases using keys created and controlled through AWS Key Management Service (KMS). On a cluster running with HAQM DocumentDB encryption, data stored at rest in the underlying storage is encrypted, as are the automated backups, snapshots, and replicas in the same cluster. By default, connections between a client and HAQM DocumentDB are encrypted-in-transit with TLS.

Compliance certifications

HAQM DocumentDB was designed to meet the highest security standards and to make it easy for customers to verify our security and meet regulatory and compliance obligations. HAQM DocumentDB has been assessed to comply with PCI DSS, ISO 9001, 27001, 27017, and 27018, SOC 1, 2 and 3, and Health Information Trust Alliance Common Security Framework certification (HITRUST CSF), in addition to being HIPAA eligible.

Highly Available

Global clusters

HAQM DocumentDB Global Clusters provides disaster recovery from region-wide outages and enables low-latency global reads. HAQM DocumentDB Global Clusters replicates your data to clusters in up to 5 AWS regions with little to no impact on performance, with a typical lag of less than one second. Learn more about setting up Global Clusters in the HAQM DocumentDB user guide.

Instance monitoring and repair

The health of your HAQM DocumentDB cluster and its instances are continuously monitored. If the instance powering your database fails, the instance and associated processes are automatically restarted. HAQM DocumentDB recovery does not require the potentially lengthy replay of database redo logs, so your instance restart times are typically 30 seconds or less. It also isolates the database cache from database processes, allowing the cache to survive a database restart.

Multi-AZ deployments with read replicas

If there is instance failure, HAQM DocumentDB automates failover to one of up to 15 HAQM DocumentDB replicas customers have created in any of three Availability Zones. If no HAQM DocumentDB replicas have been provisioned, in the case of a failure, HAQM DocumentDB will attempt to create a new instance for customers automatically.

Fault-tolerant and self-healing storage

Each 10 GB portion of your storage volume is replicated six ways, across three Availability Zones (AZs). HAQM DocumentDB uses fault-tolerant storage that transparently handles the loss of up to two copies of data without affecting database write availability and up to three copies without affecting read availability. HAQM DocumentDB’s storage is also self-healing; data blocks and disks are continuously scanned for errors and replaced automatically.

Automatic, continuous, incremental backups, and point-in-time restore

HAQM DocumentDB's simple database backup capability enables point-in-time recovery for clusters. Customers can restore their cluster to any second during the retention period, up until the last five minutes. The automatic backup retention period can be configured up to thirty-five days. Automated backups are stored in HAQM Simple Storage Service (HAQM S3), which is designed for 99.999999999% durability. HAQM DocumentDB backups are automatic, incremental, and continuous and have no impact on cluster performance.

Cluster snapshots

Cluster snapshots are user-initiated backups of cluster stored in HAQM S3 that will be kept until explicitly deleted. They leverage the automated incremental snapshots to reduce the time and storage required. Customers can create a new cluster from a Cluster Snapshot whenever desired.

Generative AI and machine learning

HAQM DocumentDB offers capabilities to enable machine learning (ML) and generative artificial intelligence (AI) models to work with data stored in HAQM DocumentDB in real time. Customers no longer have to spend time managing separate infrastructure, writing code to connect with another service, and duplicating data from their primary database.  

With vector search for HAQM DocumentDB, you can store, index, and search millions of vectors with millisecond response times. A vector is a numerical representation that represents the semantic meaning of unstructured data such as text, images, and video. You can store vectors from HAQM Bedrock, HAQM SageMaker, and other third party or propriety models. Learn how to get started by visiting our vector search for HAQM DocumentDB documentation.  

No-code machine learning with HAQM DocumentDB and HAQM SageMaker Canvas

HAQM DocumentDB integrates with HAQM SageMaker Canvas, making it easy to build generative applications using data stored in HAQM DocumentDB. The in-console integration removes the undifferentiated heavy lifting to connect and access HAQM DocumentDB to accelerate your AI/ML development with a low code no code (LCNC) experience. You can build AI/ML models for classic use cases such as regression and forecasting, or create generative AI solutions such as content generation, text extraction, and text summarization within SageMaker Canvas. Read our HAQM DocumentDB generative AI documentation to learn more.

Zero-ETL integration NEW

DocumentDB zero-ETL integration with HAQM OpenSearch Service

HAQM DocumentDB zero-ETL integration with HAQM OpenSearch Service provides advanced search capabilities (such as fuzzy search, semantic search, and more) on their HAQM DocumentDB documents using the OpenSearch API. With this integration, you can also uniquely search across collections and other non-English languages. With a few clicks in the AWS Console, you can now seamlessly synchronize their data from HAQM DocumentDB to HAQM OpenSearch Service, eliminating the need to write any custom code to extract, transform, and load the data.

This zero-ETL integration uses HAQM OpenSearch Ingestion which seamlessly moves document data from HAQM DocumentDB to HAQM OpenSearch Service. It automatically understands the format of the data in HAQM DocumentDB collections and maps the data to HAQM OpenSearch Service to yield the most performant search results. This zero-ETL integration enables consolidation from multiple HAQM DocumentDB collections into one HAQM OpenSearch managed cluster or serverless collection. You can read our documentation on working with HAQM DocumentDB zero-ETL integration with HAQM OpenSearch Service.

Learn more about product pricing

Visit the HAQM DocumentDB (with MongoDB compatibility) pricing page.

Learn more 
Sign up for a free account

Instantly get access to the AWS Free Tier. 

Sign up 
Start building in the console

Get started building with HAQM DocumentDB (with MongoDB compatibility) in the AWS Console.

Sign in