Importing the Python connector - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Importing the Python connector

To import the Python connector, run the following command.

>>> import redshift_connector

To connect to an Amazon Redshift cluster using Amazon credentials, run the following command.

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