amazon-web-servicesaws-documentdbaws-documentdb-mongoapi

AWS DocumentDb not support mongodb 4.0


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?


Solution

  • 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.