Skip to main content
Connect Amazon Redshift to xpander using IAM authentication. This guide covers connecting a private Redshift cluster accessible only from the Kubernetes cluster — no public access required.
For self-hosted deployments, ensure the AWS Operator is configured with IAM role and Pod Identity before following this guide.

Prerequisites

  • A running xpander environment (cloud or self-hosted)
  • Your xpander Organization ID
  • AWS CLI access to the account

1. Create Redshift Subnet Group

Place Redshift in the same private subnets as your EKS nodes:

2. Create Security Group

Lock access to Redshift port 5439 — only allow traffic from the EKS cluster security group:

3. Create Redshift Cluster

Wait for the cluster (~5-10 minutes):
Node types: dc2.large (0.250.33/hr)ischeapestbutnotavailableinallregions.Usera3.xlplus(0.25-0.33/hr) is cheapest but not available in all regions. Use `ra3.xlplus` (1.08-1.20/hr) as fallback. Check availability:
Get the endpoint:

4. Create IAM Role

The IAM role needs three trust principals:
The SelfAssume statement must NOT have an ExternalId condition. The AI gateway’s internal code calls sts:AssumeRole on its own role without passing an external ID. If this statement is missing or has a condition, you’ll get AccessDenied errors.

5. Attach Permission Policies

The role needs three permission policies.

Redshift Credential Access

Redshift Data API

Self-Assume and Session Tagging

6. Create IAM-Mapped Redshift User

The username IAMR:<role-name> is a Redshift convention that maps the IAM role to a database user.

7. Associate Role with Service Account

8. Configure in xpander UI

In the xpander connector configuration, set:

9. Verify Connection

Ask your xpander agent to validate the Redshift connection. Expected result: all checks pass (path config, database, target, AWS credentials, Data API client, auth method, query execution).

Troubleshooting

Add sts:TagSession to both the trust policy AND as a permission policy on the role.
The AI gateway re-assumes its own role internally. The trust policy needs a SelfAssume statement for the role’s own ARN without an ExternalId condition. Also add sts:AssumeRole as a permission policy.
Add the Redshift Data API permissions policy (see step 5).
Check the Redshift security group allows port 5439 from the EKS cluster security group.
The connector path parameters (ClusterNamePath, DatabaseNamePath, CatalogNamePath) must be configured in the xpander UI with the correct values.