Importing the Python connector - Amazon Redshift

Importing the Python connector

To import the Python connector, run the following command.

>>> import redshift_connector

To connect to an Amazon Redshift cluster using AWS 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' )