What is Amazon DocumentDB?

2 min readAug 10, 2022


Amazon DocumentDB is a managed proprietary NoSQL database service that supports document data structures and has limited support for MongoDB workloads, with some compatibility with MongoDB version 3.6 (released by MongoDB in 2017) and version 4.0 (released by MongoDB in 2018). As a document database, Amazon DocumentDB can store, query, and index JSON data.

A document database is a type of Non-Relational Database That Is Designed To Store And Query Data As Json-Like Documents. Document databases make it easier for developers to store and query data in a database by using the same document-model format they use in their application code.

Compatibility constraints:

DocumentDB emulates the MongoDB API and runs on top of Amazon’s Aurora backend platform. This creates significant architectural constraints, functionality limitations, and broken compatibility.

DocumentDB claims to support the MongoDB 4.0 API, which implies that it is at parity with MongoDB v4.0, released back in June 2018. Actually the DocumentDB 4.0 feature set still closely resembles early MongoDB 3.0 and 3.2, released in 2015, and compatibility testing reveals it fails 66% of the MongoDB API correctness tests. Applications written for MongoDB will need to be re-written to work with Amazon DocumentDB.

Differences between Amazon DocumentDB and MongoDB Atlas:

Amazon DocumentDBMongoDB AtlasSharding support Does not support sharding. Full sharding support.Concurrent connectionsLargest instance supports 30,000 concurrent connections. The largest Atlas instance supports 128,000 concurrent connections. Support for the latest MongoDB version some compatibility with MongoDB version 3.6 (released by MongoDB in 2017) and version 4.0 (released by MongoDB in 2018).Compatible with MongoDB 5.0.ReplicationAWS DocumentDB provides up to 15 replicas. MongoDB provides up to 50 replicas.PricingCheapest DocumentDB instance at around $200/month before adding I/O cost, backup and data transfer costs.Has a free tier for running small instances. Portability Can only be run on AWSCan be hosted on either AWS, Azure or GCP

Advantages of Amazon DocumentDB

  • Access control

DocumentDB supports role-based access control. This helps in implementing the least privilege by limiting what users can access and do.

  • Encryption

DocumentDB can be encrypted using the AWS KMS Management service. Backups, snapshots and replicas are also protected using DocumentDB encryption.

  • Compliance certifications

DocumentDB is PCI DSS, ISO 9001, 27001, 27017, and 27018 compliant,HIPAA compliant, SOC 1, 2, and 3 compliant.

  • Monitoring

DocumentDB provides cloudwatch analytics for cluster and instance performance in areas such as computation and memory.

Amazon DocumentDB Use cases:

Catalogs — e.g products in an eCommerce application have different attributes, each product’s attributes can be described in a single document for easy management and faster reading speed. Changing the attributes of one product won’t affect others (compared to using a relational database to store these attributes)

Profile management– With Amazon DocumentDB’s document data model, you can manage the profiles & preferences of millions of users

Mobile and web applications scaling- you can build that scale to process millions of user requests per second with millisecond latency

Useful Amazon DocumentDB links:

Wikipedia: https://en.wikipedia.org/wiki/Amazon_DocumentDB


Mongodb vs documentdb: https://www.mongodb.com/atlas-vs-amazon-documentdb

Connecting to DocumentDB:https://www.cdata.com/kb/articles/mongodb-aws-documentdb.rst

Terraform: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/docdb_cluster

Terraform module: https://registry.terraform.io/modules/boldlink/docdb-cluster/aws/latest




DevOps/DevSecOps/Cloud computing