Closed ryan6310 closed 6 months ago
Hi @ryan6310 ,
thanks for reaching out. looking at the trace, it appears the issue is hit when attempting to establish a socket to the redshift cluster. we attempt to connect to the redshift cluster after preforming authentication steps.
In your case, the authentication steps would be taking the AWS keys passed to connect()
, and using them with the boto3 redshift client to
1) get temporary IAM credentials for connecting to Redshift
2) get cluster endpoint and port
I'd recommend the following 1) enable debug logging for this scenario 2) scan the debug log to look for a redshift endpoint. confirm the endpoint is as expected. 3) e-mail the debug log to redshift-drivers[at]amazon.com, mentioning this issue and I will take a look at the logs.
please re-open if further assistance is needed
Driver version
2.0.915
Client Operating System
AWS Linux
Python version
3.10.12
Problem description
I am trying to connect to redshift from an ec2 instance in a different account from the cluster, but the same region. I have set up the VPC peering and the needed permission. Largely following this guide. The boto3 based code below to connect and query works well. I have been unable to connect using the redshift connector. How does one connect with an assumed role when using the redshift_connector?
I cannot get redshift_connector to work. This code leads to the error below.
Python Driver trace logs