title: Exception on JDBC IAM connect to Amazon Redshift
body: <p>I try to make JDBC connect to Amazon Redshift using IAM account.</p>
  <p>As described in: <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/generating-iam-credentials-configure-jdbc-odbc.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/redshift/latest/mgmt/generating-iam-credentials-configure-jdbc-odbc.html</a>
  paragraph #3, I use URL:</p>
  <pre><code>jdbc:redshift:iam://redshift-cluster-vms.my_cluster.amazonaws.com:5439/dev?AccessKeyID=AKI*********DD&amp;SecretAccessKey=tGv********************mQU
  </code></pre>
  <p>and Java code:</p>
  <pre><code>String connectString =&quot;jdbc:redshift:iam://redshift-cluster-vms.my_cluster.amazonaws.com:5439/dev?AccessKeyID=AKI*********DD&amp;SecretAccessKey=tGv********************mQU&quot;;
  Connection connection = DriverManager.getConnection(connectString);
      
  </code></pre>
  <p>The JDBC driver version: redshift-jdbc42-2.1.0.7.jar</p>
  <p>It throws the following exception:</p>
  <pre><code>java.sql.SQLException: FATAL: user &quot;IAM:SSh&quot; does not exist
          at com.amazon.redshift.util.RedshiftException.getSQLException(RedshiftException.java:56)
          at com.amazon.redshift.Driver.connect(Driver.java:336)
          at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
          at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:251)
  </code></pre>