> For the complete documentation index, see [llms.txt](https://docs.carto.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carto.com/carto-self-hosted/configuration/data-and-storage/enable-redshift-imports.md).

# Enable Redshift imports

To import data into Redshift through CARTO Self-Hosted, follow these step-by-step instructions.

{% hint style="danger" %}
This requires access to an AWS account and an existing accessible Redshift endpoint.
{% endhint %}

## 1. Create an AWS IAM user

Create an IAM user with programmatic access. Take note of the user's **ARN**, **Access Key ID**, and **Secret Access Key**.

## 2. Create an AWS S3 Bucket

Create an S3 bucket with the following settings:

* ACLs should be allowed.
* If server-side encryption is enabled, the user must be granted permissions over the KMS key following the [AWS documentation](https://repost.aws/knowledge-center/s3-bucket-access-default-encryption).

## 3. Create an AWS IAM role

Create an IAM role with the following settings:

1. Trusted entity type: `Custom trust policy`.
2. Custom trust policy: Make sure to replace `<your_aws_user_arn>`.

```json
{
  "Version": "2012-10-17",
  "Statement": [
      {
          "Effect": "Allow",
          "Principal": {
              "AWS": "<your_aws_user_arn>"
          },
          "Action": [
              "sts:AssumeRole",
              "sts:TagSession"
          ]
      }
  ]
}
```

3. Add permissions: Create a new permissions policy, replacing `<your_aws_s3_bucket_name>`.

```json
{
   "Version": "2012-10-17",
   "Statement": [
       {
           "Effect": "Allow",
           "Action": "s3:ListBucket",
           "Resource": "arn:aws:s3:::<your_aws_s3_bucket_name>"
       },
       {
           "Effect": "Allow",
           "Action": "s3:*Object",
           "Resource": "arn:aws:s3:::<your_aws_s3_bucket_name>/*"
       }
   ]
}
```

## 4. Configure your CARTO Self-Hosted deployment

Set the IAM role ARN, access key ID, and secret access key in your deployment:

{% tabs %}
{% tab title="☸️ Kots (Admin Console)" %} <img src="/files/iX0yYSxrIcdJH0mbRf9w" alt="Kots" width="18">

In the Admin Console, locate the **AWS S3 bucket** configuration and set the bucket behavior to **Custom AWS S3**. Fill in:

* **AWS arn bucket role** — the import role ARN (maps to `importAwsRoleArn`)
* **The AccessKey ID for S3 buckets** — your AWS access key ID (maps to `importAwsAccessKeyId`)
* **The AccessKey Secret for S3 buckets** — your AWS secret access key (maps to `importAwsSecretAccessKey`)

If you need import credentials that differ from your bucket credentials, set the keys shown in the Helm tab through the **Custom Configuration** field instead.
{% endtab %}

{% tab title="🛞 Helm (customizations.yaml)" %} <img src="/files/5mQydBQdQ20MZUxbcOKQ" alt="Helm" width="18">

Add the following lines to your <mark style="color:orange;">customizations.yaml</mark> file:

```yaml
appConfigValues:
  importAwsRoleArn: "<your_aws_user_arn>"

appSecrets:
  importAwsAccessKeyId:
    value: "<your_aws_user_access_key_id>"
  importAwsSecretAccessKey:
    value: "<your_aws_user_access_key_secret>"
```

{% endtab %}
{% endtabs %}

## 5. Apply the configuration changes

Deploy the updated configuration to apply the changes to your CARTO Self-Hosted instance.

## 6. Configure Redshift integration in CARTO

1. Log into CARTO Self-Hosted, go to **Data Explorer → Connections → Add new connection** and create a new Redshift connection.
2. Go to **Settings → Advanced → Integrations → Redshift → New**, enter your S3 Bucket name and region, and copy the policy generated.
3. From the AWS console, go to **S3 → Bucket → Permissions → Bucket policy** and paste the policy from the previous step.
4. Go back to the CARTO Self-Hosted Redshift integration page, check **I have already added the S3 bucket policy**, and click **Validate and save**.

## 7. Import data to Redshift

Go to **Data Explorer → Import data → Redshift connection**. You should now be able to [import a local dataset to Redshift](/carto-user-manual/data-explorer/importing-data.md)! 🎉


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.carto.com/carto-self-hosted/configuration/data-and-storage/enable-redshift-imports.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
