title: Trying to create a Redshift table using Python and psycopg2 but the table does not get created with no errors reported
body: <p>My codes return no error but I don't see a table in Redshift...if I put "if table exist" and try to create a table I know exists it does nothing and returns no error.  Take that out and it will return duplicatetable error which is odd.  </p>
  
  <pre><code>import boto3
  import psycopg2
  import sys
  
  #Assign global variables data needed to make connection to Redshift
  DB_NAME = '&lt;database&gt;'
  CLUSTER_IDENTIFIER = '&lt;clusterName&gt;'
  DB_USER = '&lt;user&gt;'
  ENDPOINT = '&lt;clustername&gt;.&lt;randomkey&gt;.us-east-1.redshift.amazonaws.com'
  REGION = 'us-east-1'
  
  sql = "CREATE TABLE if not exists " + "&lt;schema&gt;.&lt;tablename&gt; " + \
        "( vendorid varchar(4), pickup_datetime TIMESTAMP, " + \
        "dropoff_datetime TIMESTAMP, store_and_fwd_flag varchar(1), " + \
        "ratecode int, pickup_longitude float(4), pickup_latitude float(4)," + \
        "dropoff_logitude float(4), dropoff_latitude float(4), " + \
        "passenger_count int, trip_distance float(40), fare_amount float(4), " + \
        "extra float(4), mta_tax float(4), tip_amount float(4), " + \
        "tolls_amount float(4), ehail_fee float(4), improvement_surcharge float(4), " + \
        "total_amount float(4), payment_type varchar(4), trip_type varchar(4))  " + \
        "DISTSTYLE EVEN SORTKEY (passenger_count, pickup_datetime);"
  
  try:
      #make redshift connection
      client = boto3.client('redshift', region_name='us-east-1')
  
      #get temporary username and password
      cluster_creds = client.get_cluster_credentials(DbUser=DB_USER, DbName=DB_NAME, ClusterIdentifier=CLUSTER_IDENTIFIER, AutoCreate=False)
      temp_user = cluster_creds['DbUser']
      temp_pswd = cluster_creds['DbPassword']
  
      #create connection string to database
      conn = psycopg2.connect(f"host='{ENDPOINT}' port='5439' user={temp_user} password={temp_pswd} dbname='{DB_NAME}'")
  
      #Attempt to create table
      cursor = conn.cursor()
      cursor.execute(sql)
      conn.commit
      cursor.close()
      conn.close()
  
      #report any errors
  except Exception as ex:
      print("Exception name : " + ex.__class__.__name__)
      print(str(ex))
      print("Failed to open connection to Redshift database")
      sys.exit(1)
  
  </code></pre>