We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't connect to an IAMR redshift user with this lib
CREATE USER "IAMR:test_to_delete_redshift_ci" PASSWORD DISABLE;
but It work when I manually use boto3+psycopg2
import os import boto3 import psycopg2 import redshift_connector os.environ["AWS_PROFILE"] = "redshift_test_role_2" def with_lib(): conn = redshift_connector.connect( iam=True, cluster_identifier="YYYYYY", database="AAAAA", db_user="test_to_delete_redshift_ci", password="", region="eu-west-1", ) cursor = conn.cursor() cursor.execute("SELECT 10,20") print(cursor.fetchall()) def manually(): RS_PORT = 5439 DATABASE = 'AAAAAA' CLUSTER_ID = 'YYYYYYY' RS_HOST = 'XXXXXXXXXXX' client = boto3.client('redshift') cluster_creds = client.get_cluster_credentials_with_iam(ClusterIdentifier=CLUSTER_ID) print(cluster_creds) conn = psycopg2.connect( host=RS_HOST, port=RS_PORT, user=cluster_creds['DbUser'], password=cluster_creds['DbPassword'], database=DATABASE ) cur = conn.cursor() cur.execute("SELECT 10,20") print(cur.fetchall()) if __name__ == '__main__': with_lib() manually()
with_lib fail with
redshift_connector.error.ProgrammingError: {'S': 'FATAL', 'C': '42704', 'M': 'user "IAM:test_to_delete_redshift_ci" does not exist', 'F': '/opt/brazil-pkg-cache/packages/RedshiftPADB/RedshiftPADB-1.0.7910.0/AL2_x86_64/generic-flavor/src/src/pg/src/backend/utils/init/miscinit.c', 'L': '976', 'R': 'InitializeSessionUserId'}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I can't connect to an IAMR redshift user with this lib
CREATE USER "IAMR:test_to_delete_redshift_ci" PASSWORD DISABLE;
but It work when I manually use boto3+psycopg2
with_lib fail with
The text was updated successfully, but these errors were encountered: