Amazon DocumentDB is an independent emulation of a subset of features for the associated MongoDB server version they claim compatibility with.
The server implementations do not have any code in common, so it is not surprising if there are differences (sometimes significant) in behaviour and feature support.