Amazon didn't implement an entirely new database. As you can see on https://en.wikipedia.org/wiki/Amazon_DocumentDB, they just built an (admittedly clever) PostgreSQL plugin on top of Aurora PostgreSQL.
Aurora PostgreSQL is based on Aurora, which amusingly traces its roots to MySQL, but that was a long time ago. You can decide how many planks Amazon must install on the ship of Theseus before you're willing to call something "a new database", but the fundamental point is that none of those planks came from MongoDB, thanks to AGPL3.