Does the redshift_connector work with Serverless?

0

I am continuing to get timeouts with this configuration:

conn = redshift_connector.connect(
    host='examplecluster.abc123xyz789.us-west-1.redshift.amazonaws.com',
    port=5439,
    database='dev',
    user='awsuser',
    password='my_password'
 )

I am attempting to make the connection from a SageMaker Notebook (publicly accessible, not vpconly) to the Serverless cluster and have ensured that the security groups for both resources allow inbound and outbound traffic for each other.

First, does redshift_connector work with serverless? I am assuming so because there are optional parameters that would indicate this, such as 'serverless_work_group'. If that is the case, can someone please provide an example of a configuration that worked for you to connect to your serverless workgroup?

1 Answer
0

Hello there, yes. redshift serverless is supported by redshift_connector.

For code snippets on redshift_connector to serverless , please refer tutorial examples which has those details.

https://github.com/aws/amazon-redshift-python-driver/blob/master/tutorials/001%20-%20Connecting%20to%20Amazon%20Redshift.ipynb

Amazon Redshift Serverless runs in a VPC and is publicly accessible false by default. I would suggest you to review the below documentation guide for more context on connecting to redshift serverless

https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-connecting.html https://repost.aws/knowledge-center/redshift-serverless-publicly-accessible

Alternatively, you can use DataAPI which is a preferred way of programmatic access to redshift/redshift-serverless https://aws.amazon.com/blogs/big-data/use-the-amazon-redshift-data-api-to-interact-with-amazon-redshift-serverless/

AWS
SUPPORT ENGINEER
answered 4 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions