title: Failed to connect to Redshift Database usng Boto3 and Psycopg2
body: <p>My python codes fail to make a connection to Redshift database utilizing Boto3 api and psycopg2 library</p>
  
  <p>Let me ask about connecting to the db.  I do not own it.  I'm trying to use Boto3 to get_cluster_credentials.  My codes will not connect to the database an I'm thinking it's an authorization problem but I am most likely wrong, not sure.  Can you look at the codes I've written and tell me if they look ok or am I missing something which is entirely possible.  When I run it the last line prints.</p>
  
  <pre><code>import boto3
  import psycopg2
  
  client = boto3.client(service_name='redshift', region_name='us-east-1')
  
  cluster_creds = client.get_cluster_credentials(
      DbUser='#######',
      DbName='##########',
      ClusterIdentifier='########redshift',
      password = clusster_creds['DbPassword'],
      AutoCreate=False)
  
  try:
      conn = psycopg2.connect(
          host = '########-redshift.#####.us-east-1.redshift.amazonaws.com',
          prt = '5439',
          user = cluster_creds['DbUser'],
          database = 'DbName' )
  
      #Verify connection
      cursor = conn.cursor()
      cursor.execute("SELECT VERSION()")
      results = cursor.fetchone()
      ver=results[0]
  
      if (ver is None):
          print("Could not find version")
      else:
          print("The version is " + ver)
  
  except:
      print("Failed to open database connection - James")
  </code></pre>
  
  <p>I'm thinking I should see "The version is ", NOT 'Failed to open database...'</p>