Version Information
Amazon DocumentDB claims support for MongoDB v4.0 and MongoDB v5.0. These versions do not support all the newer features and functionality in the versions of MongoDB available on MongoDB Atlas. DocumentDB's compatibility with even these older versions is incomplete, and applications might not work as expected.
Tip
MongoDB Version History
To learn more about the features available in each version of MongoDB, see MongoDB Evolved - Version History.
Compatibility
On Amazon DocumentDB, the following MongoDB features are available in a limited capacity or are not supported at all:
Features: Capped collections, map-reduce operations, GridFS, text indexes, vector search indexes, partial indexes, case-insensitive indexes, time-series data, on-demand materialized views, client-side field level encryption, queryable encryption
Commands:
collMod,collMod:expireAfterSeconds,copydb,createView,filemd5,reIndex,connPoolStats,dbHash,features,getLastError,getPrevError,parallelCollectionScan,resetError,endSessions,killAllSessionsByPattern,refreshSessions, sharding commands (aside fromenableShardingandshardCollection)Query Operators:
$expr,$jsonSchema,$text,$where,$meta,$box,$center,$centerSphere,$polygon,$near,$uniqueDocsAggregation Operators:
$accumulator,$count,$stdDevPop,$stdDevSamp,$pow,$trunc,$round,$first,$last,$switch,$binarySize,$bsonSize,$dateFromParts,$dateToParts,$dateTrunc,$dateDiff,$ltrim,$rtrim,$trim,$regexFind,$regexFindAll,$regexMatch,$replaceOne,$replaceAll,$isNumber,$rand,$sampleRate,$getFieldAggregation Stages:
$collStats,$facet,$bucket,$bucketAuto,$sortByCount,$unionWith,$set,$setWindowFields,$unset,$listLocalSessions,$listSessions,$graphLookup,$merge,$planCacheStatsCursor Methods:
cursor.collation(),cursor.max(),cursor.min(),cursor.noCursorTimeout(),cursor.returnKey(),cursor.showRecordId(),cursor.tailable()
In addition, Amazon DocumentDB does not leverage indexes when performing queries that contain any of the following operators:
$ne$nin$nor$not$exists$distinct$elemMatchwhen used in nested queries
To learn more about Amazon DocumentDB's compatibility with MongoDB v4.0 and MongoDB v5.0, see the following AWS documentation:
Support
MongoDB doesn't offer commercial support for Amazon DocumentDB. For help with this product, contact AWS Support.