Hello I am just trying to connect to my documentDb using mongoose; hosted on AWS. From my local pc, I am try to do it like:
const URI = 'mongodb://username:npassword@docdb-2022-05-31-18-46-43.cluster-cnyrbefiq91q.eu-west-2.docdb.amazonaws.com:27017/?ssl=true&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false'
mongoose.connect(URI, { useNewUrlParser: true , ssl: true});
I am getting the error:
MongoParseError: option ssl_ca_certs is not supported
Can any1 explain to me what I am doing wrong?
3
Answers
DocumentDB supports TLS protocol. It worked for me when I
1/ downloaded the TLS public key using
2/ changed the parameter
ssl=true
totls=true
in the connection string,3/ and updated the params to connect() method.
I referred to this DocumentDB documentation.
Try sslCA insted of ssl_ca_certs.
I had the same issue, which I resolved by following method.