Closed whitish closed 8 years ago
try adding:
127.0.0.1 <my_database_host>.redshift.amazonaws.com
to /etc/hosts
then connect to:
create_engine("redshift+psycopg2://dbuser:pass@<my_database_host>.redshift.amazonaws.com:5439/mydb")
The reason for this error is because I enable TLS by default using the bundled RDS certificate. You can manually override this if you wish, but you can be MITMd and someone can use that to steal your password and data
Thank you, @graingert , works good now.
Can you give details about where the TLS overrides be set?
In case anyone else finds this issue, the solution to over-ride involved passing sslmode connection arguments to the create_engine command e.g.:
sqlalchemy.create_engine(url, connect_args={'sslmode': 'prefer'})
Prefer appears to over-ride the strict checking of SSL certs that is build into redshift_sqlalchemy
I m using tunneling for my EC2 RedShift DB to my localhost e.g.:
ssh -L 5439:<my_database_host>.redshift.amazonaws.com:5439 username@tunnel_host
So now I can access my DB from my sql client using as it is deployed on my localhost, e.g.:
jdbc:redshift://localhost:5439/mydb
But when I m trying to access it from python code:
I receive error next error:
Will be appreciate for any help on this.