Description
Driver version
Redshift Python Driver 2.0.908
Redshift version
1.0.37493
Client Operating System
Linux-4.14.281-212.502.amzn2.x86_64-x86_64-with-glibc2.2.5
Python version
3.8.12
Problem description
I am trying to connect to redshift via redshift_connector using passwordless IAM Authentication.
It works fine when i directly login to ecs container where superset is hosted and create/execute the cursor but When i try to create a database connection from super ui then I am getting ConnectionRefusedError.
-
Expected behaviour:
Should be able to connect and query to Redshift from Superset UI -
Actual behaviour:
Not able to connect to Redshift from Superset UI but can connect from the container where Superset container is running. -
Error message/stack trace:
ERROR: (redshift_connector.error.InterfaceError) ('communication error', ConnectionRefusedError(111, 'Connection refused'))
(Background on this error at: http://sqlalche.me/e/13/rvf5) -
Any other details that can be helpful:
SQL Alchemy URL:redshift+redshift_connector:///<databasename>
ENGINE PARAMETERS:
{
"connect_args":
{
"ssl":"True",
"region":"us-east-1",
"iam":"True",
"cluster_identifier":"<clusteridentifier>",
"db_user":"<databaseuser>"
}
}
I can telnet over 5439 to the redshift from ecs container as well as my local system.
Python Driver trace logs
Reproduction code
please see in the comment