0

I'm trying to use AWS DocumentDB which is MongoDB compatible but unable successfully connect to the database.

Are there are any additional parameters that I need to pass into Sails.js datastores.js configuration?

Currently, my configs are as following:

adapter: 'sails-mongo',
url: 'mongodb://*****:*****@********.cluster-dasdsasd.us-east-1.docdb.amazonaws.com:27017/?ssl_ca_certs=rds-combined-ca-bundle.pem&replicaSet=rs0',
Wan B.
  • 18,367
  • 4
  • 54
  • 71
Sam Axe
  • 437
  • 1
  • 8
  • 25
  • 2
    First of all, DocumentDB is only 35% MongoDB Compatible See https://www.mongodb.com/blog/post/documents-are-everywhere for more technical info. Do you receive any errors ? are you failing at connection level ? or operational ? – Wan B. Jan 25 '19 at 00:06
  • @WanBachtiar thanks for the link, I wasn't aware DocumentDB is not 100% compatible. I will have to figure out how to create my own MongoDB instance – Sam Axe Jan 25 '19 at 02:54
  • @SamAxe - You could check out MongoDB Atlas which is real MongoDB running in the cloud. – acm Jan 25 '19 at 20:10

1 Answers1

1

Looking at Sails, i would suggest disable TLS in DocumentDB[1] and try connecting. I suspect that should fix the issue for you. I am wondering if it is able to find the pem file on you applications path (This part of URL - ?ssl_ca_certs=rds-combined-ca-bundle.pem)

[1] https://docs.aws.amazon.com/documentdb/latest/developerguide/security.encryption.ssl.html