> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wisdom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to Amazon Redshift

WisdomAI allows you to connect to Amazon Redshift by choosing one of three methods:

1. [Direct Connection](#option-1%3A-direct-connection)
2. [Connect via an SSH Tunnel](#option-2%3A-connect-via-an-ssh-tunnel)
3. [Connect via VPC Peering](#option-3%3A-connect-via-vpc-peering)

This flexibility ensures you can establish a secure connection that matches your specific network architecture.

## Prerequisites

Before you begin, make sure you have the following:

* Your Amazon Redshift cluster endpoint, port, database name, and user credentials.
* Network access that allows WisdomAI to connect to your Redshift cluster. This may require configuring your firewall or AWS security groups.
* If using an SSH tunnel, you need the credentials for your bastion host.
* If using VPC peering, you need permissions to manage VPC settings in your AWS account.

## Option 1: Direct connection

Use this method if your Redshift cluster is publicly accessible or if you have whitelisted WisdomAI's IP addresses in your security group.

1. In WisdomAl, navigate to the **Connections** section and click **Add Connection**.
2. Select **Redshift** as the data source type.
3. Fill in the connection details in the **Redshift connection details** section:

| Requirement      | Description                                      |
| :--------------- | :----------------------------------------------- |
| Host             | Redshift cluster endpoint                        |
| Port             | Typically `5439`                                 |
| Username         | Database user with read access                   |
| Password         | User password                                    |
| Database Filters | Optionally restrict which databases are crawled. |

4. Click **Save and Sync metadata.** WisdomAl will use the provided credentials to connect to your Redshift account and scan the metadata of the specified databases and tables.

<img src="https://mintcdn.com/wisdomai/FPeFp9c8fz1r_sxU/dark-img/redshift-direct-conection.png?fit=max&auto=format&n=FPeFp9c8fz1r_sxU&q=85&s=6db723f094829dcecb64b7e1047f03ce" alt="Snippet displaying the Add Connection page" lightAlt="Snippet displaying the Add Connection page" darkAlt="Snippet displaying the Add Connection page" className="hidden dark:block hidden dark:block" width="1878" height="956" data-path="dark-img/redshift-direct-conection.png" />

<img src="https://mintcdn.com/wisdomai/END5rwTHT711azW1/images/redshift-01.png?fit=max&auto=format&n=END5rwTHT711azW1&q=85&s=c4af9b0c59f9b9a633c23bf86ab189e2" alt="Snippet displaying the Add Connection page" lightAlt="Snippet displaying the Add Connection page" darkAlt="Snippet displaying the Add Connection page" className="hidden dark:block dark:hidden" width="1920" height="979" data-path="images/redshift-01.png" />

<img src="https://mintcdn.com/wisdomai/END5rwTHT711azW1/images/redshift-01.png?fit=max&auto=format&n=END5rwTHT711azW1&q=85&s=c4af9b0c59f9b9a633c23bf86ab189e2" alt="Snippet displaying the Add Connection page" lightAlt="Snippet displaying the Add Connection page" darkAlt="Snippet displaying the Add Connection page" className="dark:hidden" width="1920" height="979" data-path="images/redshift-01.png" />

## Option 2: Connect via an SSH tunnel

Use this method to securely connect to a Redshift cluster that is not publicly accessible by routing traffic through a bastion host.

1. On the **Add Connection** page, fill in the direct connection details and expand the **SSH Tunnel Configuration** section.
2. Complete the **SSH Tunnel configuration fields**.

| Requirement              | Description                                                   |
| :----------------------- | :------------------------------------------------------------ |
| SSH Host                 | Hostname or IP address of the bastion host                    |
| SSH Port                 | Port number on the SSH host (e.g., `22`)                      |
| SSH Username             | The username required to log in to the bastion host           |
| Authentication Method    | Authenticate using either a **Private Key** or a **Password** |
| SSH Private Key/Password | The Private Key or Password for the SSH authentication        |

3. Click **Save and Sync metadata.**

<img src="https://mintcdn.com/wisdomai/FPeFp9c8fz1r_sxU/dark-img/connect-sshTunel.png?fit=max&auto=format&n=FPeFp9c8fz1r_sxU&q=85&s=dc7f3d55042e047292647312a354ee1d" alt="Snippet displaying the Add Connection page with the SSH Tunnel Configuration section displayed" lightAlt="Snippet displaying the Add Connection page with the SSH Tunnel Configuration section displayed" darkAlt="Snippet displaying the Add Connection page with the SSH Tunnel Configuration section displayed" className="hidden dark:block" width="1100" height="528" data-path="dark-img/connect-sshTunel.png" />

<img src="https://mintcdn.com/wisdomai/END5rwTHT711azW1/images/redshift-02.png?fit=max&auto=format&n=END5rwTHT711azW1&q=85&s=5923fcd2975f43efde81bc6842ec4d1a" alt="Snippet displaying the Add Connection page with the SSH Tunnel Configuration section displayed" lightAlt="Snippet displaying the Add Connection page with the SSH Tunnel Configuration section displayed" darkAlt="Snippet displaying the Add Connection page with the SSH Tunnel Configuration section displayed" className="dark:hidden" width="1920" height="922" data-path="images/redshift-02.png" />

## Option 3: Connect via VPC peering

This method establishes a private and secure network connection between WisdomAI's AWS environment and your Amazon VPC, preventing exposure to the public internet.

This is a standardized procedure for all supported data sources hosted on AWS. For the complete, step-by-step instructions, please refer to our comprehensive guide: [Connect via AWS VPC Peering](https://docs.askwisdom.ai/getting-started/connect-data-sources/connect-aws-vpc-peering).

## Next steps

<CardGroup cols={3}>
  <Card title="Connect to Databricks" icon="layer-group" href="/getting-started/connect-data-sources/connect-to-databricks">
    Connect to Databricks using a Client ID and Client Secret for authentication, enabling secure and controlled access to your data.
  </Card>

  <Card title="Connect to Google BigQuery" icon="google" href="/getting-started/connect-data-sources/connect-to-google-bigquery">
    Connect to Google BigQuery using a Google Cloud Platform Service Account for secure and granular access to your data.
  </Card>

  <Card title="Connect and Test Tutorial" icon="rocket" href="/setting-up-wisdom-ai/basic-tutorial-connect-and-test">
    Walk through the initial setup to connect a data source and run your first query.
  </Card>
</CardGroup>
