# Amazon Redshift

ConnectyAI allows you to connect to Amazon Redshift instance via one of the following methods:

1. Using [#direct-connection](#direct-connection "mention").
2. Connecting via an [#ssh-tunnel](#ssh-tunnel "mention").
3. Using [#redshift-data-api](#redshift-data-api "mention").

## Prerequisites

Before you begin please, make sure you have the following:

* Your Amazon Redshift host (endpoint), port, database name and user credentials.
* Network configuration that allows ConnectyAI, to reach your Amazon Redshift instance. That may require configuring an AWS Security Group and/or your firewall.
* In case of using an SSH Tunnel, credentials for bastion host.
* In case of using Redshift Data API, service account IAM user CLI credentials and apprioprate IAM role.

## ConnectyAI IPs

```
52.2.141.187
34.224.181.184
54.243.108.40
18.193.219.122
```

## Direct Connection

In Direct Connection approach ConnectyAI needs to have direct network access to your Amazon Redshift instance. That usually means:

* Your Amazon Redshift instance should have `public access` property turned on.
* The Security Group attached to your Amazon Redshift instance should allow incoming traffic from [#connectyai-ips](#connectyai-ips "mention")addresses on the port configured for your instance.

&#x20; Once the network connection can be established, then you need to configure the following fields.

### 1. Host and Port

Your Amazon Redshift instance host is the URL pointing to that instance. It's usually of the form:

{% hint style="info" %}

* ✅ Host: `<instance-name>.<aws-account-id>.redshift-serverless.amazonaws.com`
* ❌ Host: `<instance-name>.<aws-account-id>.redshift-serverless.amazonaws.com:5439/db`  (do not include database or port in the host)&#x20;
* ✅ Port: `5439`  (default port)
  {% endhint %}

### 2. Username and Password

These credentials authenticate you to the database.

* **Username**: the database user name.
* **Password**: the password associated with that user.

### 3. Database name

Connection needs to be established for a given database. Please make sure that given database exists in given Amazon Redshift instance and the configured user has appropriate access.

### 4. SSL Mode (optional)

Controls whether and how SSL/TLS is used for the connection. Available options:

* `require` : SSL is required, but the server certificate is **not** verified.
* `verify-ca` : SSL required and server certificate **must** be signed by a trusted CA.
* `verify-full` : SSL required and server hostname **must** match certificate.

Default value in ConnectyAI connections is `require`. For `verify-ca` and `verify-full` options please contact our support.

## SSH Tunnel

Available on the Enterprise Plan.&#x20;

## Redshift Data API

Available on the Enterprise Plan.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://connectyai.gitbook.io/documentation/getting-started/data-connections-guide/amazon-redshift.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
