ruby-on-railsmongoidaws-documentdb-mongoapiaws-documentdb

How to use AWS Document DB with Ruby On Rails? Compatibility with version 3.6?


recently AWS implemented compatibility with MongoDB version 3.6 via DocumentDB.

Document DB requires a certificate that can be downloaded at:

https://s3-us-gov-west-1.amazonaws.com/rds-downloads/rds-GovCloud-Root-CA-2017.pem

Using a configuration file similar to:

https://github.com/mongodb/mongoid/blob/master/lib/rails/generators/mongoid/config/templates/mongoid.yml

I would like to know if there is a way to set compatibility with 3.6 in mongoid gem or if there is a specific version that ensures that version 3.6 is used?

Thank you


Solution

  • First, it is important to note that DocumentDB implements only partial compatibility with "MongoDB 3.6" as Amazon advertises. You can read more about some of the incompatibilities here: https://www.mongodb.com/blog/post/documents-are-everywhere

    Mongoid works, and is tested, with the actual MongoDB 3.6 server. No special configuration is needed.

    Using Mongoid with DocumentDB may work or may expose incompatibilities/omissions in Amazon's document database, depending on exact operations attempted.