title: Connection getting skipped when connecting to Postgress DB
body: <p>I'm writing a lambda function to connect to a postgress DB that I have on an EC2 instance.  I've been utilizing the 'pg' library for connecting as found in their documentation, however, my function keeps skipping over the establish connection piece of my method and just continuing and exiting without accomplishing anything.  </p>
  
  <pre><code>const client = new Client({
      user: 'user',
      host: 'xxxx.xxx.xxxx',
      database: 'dbname',
      password: 'password',
      port: 5432,
    })
    client.connect(err =&gt; {
      if (err) {
        console.error('connection error', err.stack)
      } else {
        console.log('connected')
      }
    })
  
    client.query('select count(*) from "Product"', (error, results) =&gt; {
      if (error) {
        console.log("Error when trying to query");
        throw error
      }
      console.log(results.rows)
    })
  </code></pre>
  
  <p>I'm going exactly by the methods that the 'pg' documentation says (<a href="https://node-postgres.com/features/connecting" rel="nofollow noreferrer">https://node-postgres.com/features/connecting</a>), but can't figure out what is going wrong here. I'm using serverless with nodejs12.x for this function.</p>