title: Not able to connect to AWS DocumentDB from my ubuntu EC2 machine
body: <p>I can't connect to my Amazon DocumentDB from my amazon EC2 ubuntu machine?  I've checked the security of the Amazon DocumentDB and it's currently assigned to the default which has "all traffic".</p>
  
  <p>I've tried the following command, straight out of the AWS instances page although I receive the error message included below.</p>
  
  <p>I've followed this aws guide <a href="https://docs.aws.amazon.com/documentdb/latest/developerguide/getting-started.connect.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/documentdb/latest/developerguide/getting-started.connect.html</a></p>
  
  <p><strong>Mongo shell command from the EC2 ubuntu machine</strong></p>
  
  <pre><code>mongo --ssl --host mydatabasename.23scnncsd3.eu-west-1.docdb.amazonaws.com:27017 --sslCAFile rds-combined-ca-bundle.pem --username webuser --password mypassword
  </code></pre>
  
  <p>The error message I receive from within the ubuntu command prompt is below</p>
  
  <p><strong>Error message</strong></p>
  
  <pre><code>MongoDB shell version v3.6.11
  connecting to: mongodb://mydatabasename.23scnncsd3.eu-west-1.docdb.amazonaws.com:27017/?gssapiServiceName=mongodb
  2019-03-11T21:39:37.587+0000 W NETWOK  [thread1] Failed to connect to 172.31.45.184:27017 after 5000ms milliseconds, giving up.
  2019-03-11T21:39:37.595+0000 E QUERY    [thread1] Error: couldn't connect to server mydatabasename.23scnncsd3.eu-west-1.docdb.amazonaws.com:27017, connection attempt failed :
  connect@src/mongo/shell/mongo.js:263:13
  @(connect):1:6
  exception: connect failed
  </code></pre>
  
  <p>Am I doing something wrong? Any help appreciated!</p>
  
  <p>Many thanks,</p>
  
  <p><strong>Update</strong></p>
  
  <p><a href="https://i.stack.imgur.com/gjFnb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gjFnb.png" alt="aws screen shot"></a></p>