Importing NumPy and connecting to Amazon Redshift - 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 NumPy and connecting to Amazon Redshift

To import the Amazon Redshift Python connector and Numerical Python (NumPy), run the following commands.

import redshift_connector import numpy

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' )