This post compares DynamoDB vs. MongoDB, the two most popular noSQL databases.
NoSQL databases are developer friendly because data is stored in JSON-like documents that easily map to objects of a programming language. The documents (rows in SQL) can be of different structure each because no upfront definition of a schema is required. The data schema may change with each release. This is good news for developer agility. Also the speed of queries is fast because of data denormalization. However, noSQL can also become a nightmare if you have to organize that data for something downstream like reporting or ERP integrations. In the realm of narrowly defined problems data formats with a schema dominate: XML, REST, SQL.
So let’s assume we have our mind set on a noSQL solution for whatever reason. Then MongoDB and DynamoDB are the top contenders. There are a other reviews on the internet, but I found them to be biased depending on who wrote them. , .
Below is a table that compares both systems feature by feature (searchable and sortable table if you are in a hurry).
|Description||Fully managed noSQL database |
in the AWS Cloud
|Most popular noSQL
|Database model||Both document and|
|Developer||Amazon, since 2012||MongoDB Inc.,
|Cloud hosted||yes||MongoDB Atlas|
|Server OS||hosted||Linux, OS X,
|Data scheme (model enforcement)||no||Schema Validation
|Data Types||String, Boolean,Byte, Date, Calendar, Long, Integer, |
Double, Float, BigDecimal, BigInteger
|String, Boolean, Date,
Timestamp, Integer, Double,
Decimal, Object, Regular Expression,
Null, Binary data
|Data Size||400 KB||16 MB|
|Querying||by key and partial key||by key, ranges, faceted search, graph traversals, geospatial, aggregations|
|Index||hash or range-hash, primary plus 5 local (same partition) and 5 global indexes (eventual consistency)||primary and on
any field strongly
Indexing strategies include compound,
unique, array, partial,
sparse, hash, and
|API access||AWS DynamoDB |
|REST API since 4.0|
|Supported Programming Languages||.Net,ColdFusion,|
but Change Events
since 4.0 can be
used to build one
|Map Reduce||Tight integration with AWS EMR||built in|
|Consistency||eventual (default) |
|Transactions||no||yes, since 4.0|
|In-memory capabilities||DAX||in-memory storage engine
|User access||Users, groups and |
roles via AWS IAM
|Access rights for
users and roles
|Monitoring||AWS CloudWatch||MongoDB Atlas
tracks 100+ metrics
|On demand and continuous||continuous, queryable
point-in-time recovery (Atlas)
|Throughput Limits||10k ops / sec, more |
available on request
|limited by hardware|
|Pricing||Based on throughput |
(read, write) and index size
|Based on Memory
|Free Tier||250 million requests / month, 25 GB storage||512 MB|
|Prominent companies||Amazon, Samsung, |
New York Times,
eBay, BOSH, Adobe,
It depends, of course, on your situation. There is a good discussion on Stack Overflow , but things constantly evolve and some long held opinions are not longer true.
Amazon DynamoDB is a fully managed cloud NoSQL database service. Create your tables, set your throughput, after that the heavy lifting is up to Amazon (managing distributed database cluster, installing patches, configurations, partitioning, scaling, etc.).
DynamoDB supports an Event Driven Architecture by integrating with AWS Lambda. The advantage here is (asynchronous) extensibility and integration to other systems. Fine-grained user access and control is achieved with AWS Identity and Access Management (IAM).
DynamoDB regularly ranks in Gartner’s Magic Quadrant. With its recent DAX (Amazon DynamoDB Accelerator) feature, query times below 1 milli seconds are only a one-click configuration away. This is a 10 X performance improvement that opens up entire new possibilities where such hyper-speed is of the essence.
MongoDB is very popular with developers. It provides the ‘M’ in the so-called MEAN stack (Mongo, Express, Angular, NodeJS). One developer can build an entire application rapidly with MEAN (or React, VueJS, and similar JS frameworks). However, with time people started complaining about MongoDB that it was missing features essential to enterprise-grade applications, for instance
– no support for multi-document transactions
– no support for money type
– no support for schema validation (constraints)
– single write node (scalability bottleneck)
Over the last few years MongoDB addressed these concerns one by one. With 4.0 there is multi-document transaction support which puts it on par with SQL databases. Earlier versions saw the introduction of schema validations, and a DecimalObject data type to model money. The hosted service solution AtlasDB takes care of the management aspect, so it is not much behind DynamoDB in this respect.
Mongo has a myriad of advanced features, data types, language support, indexing strategies which DynamoDB doesn’t. It’s aggregation pipeline alone has over 100 operators for just any use case imaginable. Mongo University offers free online courses.
Use DynamoDB if you have a robust use case with a simplistic data model, if you care more about operational stability than sophistication. This is also a consideration if you are short on skills or staff.
Use MongoDB if you build a product with requirements that change rapidly and in unpredictable ways. MongoDB has superior features (20 MB record size, nested arrays and objects graphs, various indexing strategies, many different ways to query and aggregate) and fewer limitations. It can be used for more advanced projects. The quibbles from the past are no longer justified. With version 4.0 MongoDB has become an enterprise-grade database like Oracle back in the days. With the hosted Atlas solution you have an alternative to DynamoDB or Azure CosmosDB or Google Bigtable, you’ll be able to focus on the implementation more.
 Comparing DynamoDB and MongoDB (MongoDB)
 Dynamo vs MongoDB, Panoply
 DynamoDB vs MongoDB NoSQL (Stack Overflow)by