Supported MongoDB APIs, Operations, and Data Types - Amazon DocumentDB

Supported MongoDB APIs, Operations, and Data Types

Amazon DocumentDB (with MongoDB compatibility) is a fast, scalable, highly-available, and fully managed document database service that supports MongoDB workloads. Amazon DocumentDB is compatible with the MongoDB 3.6 API. This section lists the supported functionality. For functional differences between Amazon DocumentDB and MongoDB, please see Functional Differences: Amazon DocumentDB and MongoDB.

MongoDB commands and operators that are internal-only or not applicable to a fully-managed service are not supported and are not included in the list of supported functionality. All capabilities marked as Yes have been available in the service since launch. New capabilities that are added will be marked with Yes and the date it was launched.

If there is a feature that isn't supported that you'd like us to build, let us know by sending an email with your accountID, the requested features, and use case to the Amazon DocumentDB service team. We have added over 50+ additional capabilities since launch, and will continue to work backwards from our customers to deliver the capabilities that they need. For information on the most recent launches, see Amazon DocumentDB Announcements.

Database Commands

Aggregation

Command Supported

aggregate

Yes

count

Yes

distinct

Yes

mapReduce

No

Query and Write Operations

Command Supported

delete

Yes

find

Yes

findAndModify

Yes

getLastError

No

getMore

Yes

getPrevError

No

insert

Yes

parallelCollectionScan

No

resetError

No

update

Yes

Change streams

Yes (10/23/19)

GridFS

No

Authentication

Command Supported

authenticate

Yes

logout

Yes

User Management

Command Supported

createUser

Yes

dropAllUsersFromDatabase

Yes

dropUser

Yes

grantRolesToUser

Yes (03/26/20)

revokeRolesFromUser

Yes (03/26/20)

updateUser

Yes

userInfo

Yes

Role Management Commands

Command Supported

createRole

No

dropRole

No

dropAllRolesFromDatabase

No

grantRolesToRole

No

revokePrivilegesFromRole

No

revokeRolesFromRole

No

updateRole

No

rolesInfo

No

Administrative Commands

Command Supported

Capped Collections

No

cloneCollectionAsCapped

No

collMod

Partial

collMod: expireAfterSeconds

Yes (8/1/19)

convertToCapped

No

copydb

No

create

Yes

createView

No

createIndexes

Yes

currentOp

Yes

drop

Yes

dropDatabase

Yes

dropIndexes

Yes

filemd5

No

killCursors

Yes

killOp

Yes

listCollections

Yes

listDatabases

Yes

listIndexes

Yes

reIndex

No

renameCollection

No

Diagnostic Commands

Command Supported

buildInfo

Yes

collStats

Yes

connPoolStats

No

connectionStatus

Yes

dataSize

Yes

dbHash

No

dbStats

Yes

explain

Yes

explain: executionStats

Yes (03/23/20)

features

No

hostInfo

Yes

listCommands

Yes

profiler

Yes (8/19/19)

serverStatus

Yes

top

Yes (8/1/19)

Query and Projection Operators

Comparison Operators

Operator Supported

$eq

Yes

$gt

Yes

$gte

Yes

$lt

Yes

$lte

Yes

$ne

Yes

$in

Yes

$nin

Yes

Logical Operators

Operator Supported

$or

Yes

$and

Yes

$not

Yes

$nor

Yes

Element Operators

Operator Supported

$exists

Yes

$type

Yes

Evaluation Query Operators

Operator Supported

$expr

No

$jsonSchema

No

$mod

Yes (2/6/20)

$regex

Yes

$text

No

$where

No

Array Operators

Operator Supported

$all

Yes

$elemMatch

Yes

$size

Yes

Bitwise Operators

Operator Supported

$bitsAllSet

Yes

$bitsAnySet

Yes

$bitsAllClear

Yes

$bitsAnyClear

Yes

Comment Operator

Operator Supported

$comment

Yes

Projection Operators

Operator Supported

$

Yes

$elemMatch

Yes

$meta

No

$slice

Yes

Update Operators

Field Operators

Operator Supported

$inc

Yes

$mul

Yes

$rename

Yes

$setOnInsert

Yes

$set

Yes

$unset

Yes

$min

Yes

$max

Yes

$currentDate

Yes

Array Operators

Operator Supported

$

Yes

$[]

Yes (2/28/19)

$[<identifier>]

Yes (2/28/19)

$addToSet

Yes

$pop

Yes

$pullAll

Yes

$pull

Yes

$push

Yes

Update Modifiers

Operator Supported

$each

Yes

$slice

Yes

$sort

Yes

$position

Yes

Bitwise Operators

Operator Supported

$bit

Yes

Geospatial

Query Selectors

Query Selectors Supported

$geoIntersects

No

$geoWithin

No

$near

No

$nearSphere

No

Geometry Specifiers

Query Selectors Supported

$box

No

$center

No

$centerSphere

No

$nearSphere

No

$geometry

No

$maxDistance

No

$minDistance

No

$polygon

No

$uniqueDocs

No

Cursor Methods

Method Supported

cursor.batchSize()

Yes

cursor.close()

Yes

cursor.isClosed()

Yes

cursor.collation()

No

cursor.comment()

Yes

cursor.count()

Yes

cursor.explain()

Yes

cursor.forEach()

Yes

cursor.hasNext()

Yes

cursor.hint()

Yes (2/28/19)

cursor.isExhausted()

Yes

cursor.itcount()

Yes

cursor.limit()

Yes

cursor.map()

Yes

cursor.maxScan()

Yes

cursor.maxTimeMS()

Yes

cursor.max()

No

cursor.min()

No

cursor.next()

Yes

cursor.noCursorTimeout()

No

cursor.objsLeftInBatch()

Yes

cursor.pretty()

Yes

cursor.readConcern()

Yes

cursor.readPref()

Yes

cursor.returnKey()

No

cursor.showRecordId()

No

cursor.size()

Yes

cursor.skip()

Yes

cursor.sort()

Yes

cursor.tailable()

No

cursor.toArray()

Yes

Aggregation Pipeline Operators

Stage Operators

Operator Supported

$collStats

No

$project

Yes

$match

Yes

$redact

Yes (2/28/19)

$limit

Yes

$skip

Yes

$unwind

Yes

$group

Yes

$sample

Yes (4/4/19)

$sort

Yes

$geoNear

No

$lookup

Yes (10/15/19)

$out

No

$indexStats

Yes (2/28/19)

$facet

No

$bucket

No

$bucketAuto

No

$sortByCount

No

$addFields

Yes (10/15/19)

$replaceRoot

No

$count

Yes

$currentOp

Yes

$listLocalSessions

No

$listSessions

No

$graphLookup

No

Boolean Operators

Operator Supported

$and

Yes

$or

Yes

$not

Yes

Set Operators

Operator Supported

$setEquals

No

$setIntersection

No

$setUnion

No

$setDifference

No

$setIsSubset

No

$anyElementTrue

No

$allElementsTrue

No

Comparison Operators

Operator Supported

$cmp

Yes

$eq

Yes

$gt

Yes

$gte

Yes

$lt

Yes

$lte

Yes

$ne

Yes

Arithmetic Operators

Command Supported

$abs

Yes

$add

Yes

$ceil

No

$divide

Yes

$exp

No

$floor

No

$ln

No

$log

No

$log10

No

$mod

Yes (2/6/20)

$multiply

Yes

$pow

No

$sqrt

No

$subtract

Yes

$trunc

No

String Operators

Operator Supported

$concat

Yes (2/28/19)

$indexOfBytes

Yes (4/4/19)

$indexOfCP

Yes (4/4/19)

$split

Yes (4/4/19)

$strcasecmp

Yes (2/28/19)

$strLenBytes

Yes (4/4/19)

$strLenCP

Yes (4/4/19)

$substr

Yes (2/28/19)

$substrBytes

Yes (2/28/19)

$substrCP

Yes (2/28/19)

$toLower

Yes (4/4/19)

$toUpper

Yes (4/4/19)

Operator Supported

$meta

No

Array Operators

Operator Supported

$arrayElemAt

Yes

$arrayToObject

Yes (2/6/20)

$concatArrays

Yes (10/15/19)

$filter

Yes

$indexOfArray

No

$isArray

Yes

$objectToArray

Yes (2/6/20)

$range

Yes (2/6/20)

$reverseArray

No

$reduce

No

$size

Yes (2/28/19)

$slice

Yes (2/6/20)

$zip

No

$in

Yes (8/1/19)

Variable Operators

Operator Supported

$map

No

$let

No

System Variables

Variable Supported

$$CURRENT

No

$$DESCEND

Yes (2/28/19)

$$KEEP

Yes (2/28/19)

$$PRUNE

Yes (2/28/19)

$$REMOVE

No

$$ROOT

No

Literal Operator

Operator Supported

$literal

No

Natural Operator

Operator Supported

$natural

No

Date Operators

Operator Supported

$dayOfYear

Yes (4/4/19)

$dayOfMonth

Yes (4/4/19)

$dayOfWeek

Yes (4/4/19)

$year

Yes (4/4/19)

$month

Yes (4/4/19)

$week

Yes (8/1/19)

$hour

Yes (4/4/19)

$minute

Yes (4/4/19)

$second

Yes (4/4/19)

$millisecond

Yes (4/4/19)

$dateToString

Yes (8/1/19)

$isoDayOfWeek

Yes (8/1/19)

$isoWeek

Yes (8/1/19)

$dateFromParts

No

$dateToParts

No

$dateFromString

Yes (03/23/20)

$isoWeekYear

Yes (08/01/19)

Conditional Expression Operators

Operator Supported

$cond

Yes

$ifNull

No

$switch

No

Data Type Operator

Operator Supported

$type

No

Accumulator Expressions

Expression Supported

$sum

Yes

$avg

Yes

$first

Yes

$last

Yes

$max

Yes

$min

Yes

$push

Yes (2/28/19)

$addToSet

Yes (8/1/19)

$stdDevPop

No

$stdDevSamp

No

Merge Operator

Operator Supported

$mergeObjects

No

Data Types

Data Type Supported

Double

Yes

String

Yes

Object

Yes

Array

Yes

Binary Data

Yes

ObjectId

Yes

Boolean

Yes

Date

Yes

Null

Yes

32-bit Integer (int)

Yes

Timestamp

Yes

64-bit Integer (long)

Yes

MinKey

Yes

MaxKey

Yes

Decimal128

No

Regular Expression

No

JavaScript

No

JavaScript (with scope)

No

Undefined

No

Symbol

No

DBPointer

No

Indexes and Index Properties

Indexes

Index Type Supported

Single Field Index

Yes

Compound Index

Yes

Multikey Index

Yes

Text Index

No

2dsphere

No

2d Index

No

Hashed Index

No

Index Properties

Index Property Supported

TTL

Yes

Unique

Yes

Partial

No

Case Insensitive

No

Sparse

Yes

Background

Yes