Docs Menu
Docs Home
/
MongoDB Drivers
/

Amazon DocumentDB Compatibility

On this page

  • Version Information
  • Compatibility
  • Support

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.

Tip

MongoDB Version History

To learn more about the features available in each version of MongoDB, see MongoDB Evolved - Version History.

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 from enableSharding and shardCollection)

  • Query Operators: $expr, $jsonSchema, $text, $where, $meta, $box, $center, $centerSphere, $polygon, $near, $uniqueDocs

  • Aggregation 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, $getField

  • Aggregation Stages: $collStats, $facet, $bucket, $bucketAuto, $sortByCount, $unionWith, $set, $setWindowFields, $unset, $listLocalSessions, $listSessions, $graphLookup, $merge, $planCacheStats

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

  • $elemMatch when 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:

MongoDB doesn't offer commercial support for Amazon DocumentDB. For help with this product, contact AWS Support.