title: Unhandled promise rejection: Error: URL malformed, cannot be parsed
body: <p>I am new to aws and mongodb at the same time, so I'm stuck at a very basic point in trying to connect to my mongo databse, hosted on an amazon linux ec2 instance. The reason is, I'm not able to build the path to my database.</p>
  
  <p>Here is what I'm trying to use: </p>
  
  <pre><code>mongoose.connect('mongod://ec2-user@ec2-XX-XX-XXX-XXX-XX.compute-1.amazonaws.com:27017/test' )
  </code></pre>
  
  <p>And here is the result of my test lambda function: </p>
  
  <pre><code>UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: URL malformed, cannot be parsed
  </code></pre>
  
  <p>I'm using mongodb 3.6.5.</p>