amazon-web-servicesmernaws-documentdbaws-documentdb-mongoapi

MERN Stack in AWS


I am new to MERN stack and managed to build an app. I want to deploy it in AWS. But the problem I have to use document DB instead of Mongo DB. Do I need to rewrite my code to do this. Can I use the same mongoose methods? Please help. I am very new to this.


Solution

  • DocumentDB is API compatible with MongoDB for the most part, that's its whole claim to fame, so you most likely won't have to change anything.

    There are however some limitations and differences between the systems, which are documented here (Unfortunately the article is too long to briefly summarize it here, so I'm just going to include the list of subtopics - check out the docs for more details).

    • Admin Databases and Collections
    • cursormaxTimeMS
    • explain()
    • Field Name Restrictions
    • Index Builds
    • Lookup with empty key in path
    • MongoDB APIs, Operations, and Data Types
    • mongodump and mongorestore Utilities
    • Result Ordering
    • Retryable Writes
    • Sparse Index
    • Storage Compression
    • Using $elemMatch Within an $all Expression
    • $distinct and $elemMatch Indexing
    • $lookup