title: EC2 instance connect : There was a problem setting up the instance connection
body: <p>I launched a new Amazon Linux 2 instance. I tried connecting to the instance via the EC2 instance connect option under the <code>Connect</code> -> <code>EC2 Instance Connect (browser-based SSH connection)</code> option in the Management Console. I get the error:</p>
  
  <pre><code>There was a problem setting up the instance connection
  An internal error has occurred within the remote server, and the connection has been terminated.
  If this instance has just started up, try again in a minute or two.
  </code></pre>
  
  <p>The SSH port is open to the world(0.0.0.0/0). I am able to connect to EC2 instance with the SSH key configured via my local machines terminal but instance connect from the browser is not working.</p>