title: Unable to connect to AWS Documentdb using MongoDB Compass. No option to pass sslInvalidHostName
body: <p>AWS DocumentDB is a relatively new service we're trying to migrate to. To connect from outside of the VPC, you have to create a tunnel to an existing instance. </p>
  
  <p>For example: </p>
  
  <pre><code>ssh -i "ec2Access.pem" -L 27017:sample-cluster.cluster-cu52jq5kfddg.us-east-1.docdb.amazonaws.com:27017 ubuntu@ec2-34-229-221-164.compute-1.amazonaws.com -N
  </code></pre>
  
  <p>And then you can connect from mongo shell with: </p>
  
  <pre><code>mongo --sslAllowInvalidHostnames --ssl --sslCAFile rds-combined-ca-bundle.pem --username &lt;yourUsername&gt; --password &lt;yourPassword&gt; 
  </code></pre>
  
  <p>You can see this info at: <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/connect-from-outside-a-vpc.html" rel="noreferrer">https://docs.aws.amazon.com/documentdb/latest/developerguide/connect-from-outside-a-vpc.html</a></p>
  
  <p>I'm actually able to get a shell into document db following the above instructions but I can not connect to it using MongoDB compass. We need to be able to do this for our non-developer team. </p>