Pujaba Zala
Pujaba Zala

Reputation: 133

Failing to connect redshift cluster having not publicly accessible

I'm newbie to AWS Redshift & I'm not able to fetch data from schema from Redshift cluster. Cluster is inside VPC and having no publicly access. I configured security group and configured inbound with:

1) Type : Redshift, Protocol : TCP, Port Range: 5439, Source: 0.0.0.0/0

2) Type : Redshift, Protocol : TCP, Port Range: 5439, Source: 'Security group name'

I've followed some of the docs, blogs & various libraries like redshift_tool with pandas, SQLAlchemy, pyodbc to configure clusters for python & came up with one library to use psycopg2

conn = psycopg2.connect(
            host=HOST,
            port=RS_PORT,
            user=RS_USER,
            password=PWD)

But I'm facing following error for all the libraries including psycopg2

psycopg2.OperationalError: could not connect to server: Connection timed out Is the server running on host and accepting TCP/IP connections on port 5439?

Q1) Am I missing some steps to configure? Please do suggest if any other way is available to connect cluster with python/drivers

Q2) How to connect clusters via SSH tunnel? If this is possible way to connect then please help me with the steps.

Thanks in Advance.

Upvotes: 2

Views: 1572

Answers (1)

Sami
Sami

Reputation: 115

Make sure you added 'VPC security groups' You can find it on 'Network and Security'.

Upvotes: 0

Related Questions