title: Amazon RDS PostgreSQL not accepting TCP connections on port 5432
body: <p>I have created a PostgreSQL Amazon RDS databaes but I cannot connect to it from my local machine.</p>
  
  <p>I am connecting like this:</p>
  
  <pre><code>psql -h &lt;db endpoint&gt; -p 5432 -U &lt;username&gt; &lt;db name&gt;
  </code></pre>
  
  <p>Response is:</p>
  
  <blockquote>
    <p>Is the server running on host  and accepting TCP/IP connections on port 5432?</p>
  </blockquote>
  
  <p>Here are the database settings:</p>
  
  <p><img src="https://i.stack.imgur.com/JCSlH.png" alt="RDS settings"></p>
  
  <p>Here are my security group settings:</p>
  
  <p><img src="https://i.stack.imgur.com/Zdihk.png" alt="Security group inbound rules"></p>