I do not know why AWS DocumentDb does not support MongoDB version that above 3.6? Should I use mongo 3.6 or 4.0 above?
-
Amazon DocumentDB now support MongoDB 4.0 compatibility: https://aws.amazon.com/about-aws/whats-new/2020/11/amazon-documentdb-with-mongodb-compatibility-adds-support-for-mongodb-4-and-transactions/ – Joseph Idziorek Nov 09 '20 at 21:35
4 Answers
Amazon DocumentDB now supports MongoDB 4.0 compatibility including transactions: https://aws.amazon.com/about-aws/whats-new/2020/11/amazon-documentdb-with-mongodb-compatibility-adds-support-for-mongodb-4-and-transactions/

- 4,853
- 6
- 23
- 37
-
Looks like MongoDB 5.0 compatibility has been added also https://docs.aws.amazon.com/documentdb/latest/developerguide/compatibility.html#mongodb-50 – BDF Apr 25 '23 at 14:38
Document DB is compatible with only MongoDB 3.6. See: https://aws.amazon.com/documentdb/features/ Whether you want to use 3.6 vs 4.0 or even 4.2 or 4.4 is very subjective to what you want to do with the DB.
The pros of using Document DB is that its a managed service and hence you dont have to worry a lot about setting it up. The con is you will not get features present in version 3.6 onwards example multi document transactions, new operators in the agg pipeline, bug fixes etc. To figure out the exact changes check - https://docs.mongodb.com/manual/release-notes/
You can install mongodb on EC2 instances, this will ensure you will get the latest and greatest mongodb. However this comes with the added work of managing the mongodb instance, its backups, High availability considerations etc.
Do note: No matter what you decide I would recommend that you try to use the latest drivers that are present today so that you have the freedom to go to the latest version of self installed mongo or even upgrade document db engine versions as they become available.

- 17,656
- 10
- 41
- 55
AWS DocumentDb uses its own database engine compatible with MongoDB 3.6 API.
MongoDB 4.0 API is not supported as of yet.

- 452
- 5
- 9
We have MongoDB Atlas available in AWS - AWS also supports fully managed database service - MongoDB Atlas - https://aws.amazon.com/de/quickstart/architecture/mongodb/ AWS enables to set up the infrastructure to support MongoDB deployment in a flexible, scalable, and cost-effective manner on the AWS Cloud.

- 91
- 6