Connect to Amazon Redshift
Connect Amazon Redshift to Retool and read and write data in your data warehouse.
Amazon Redshift is a fully managed, petabyte-scale data warehouse service built on PostgreSQL.
What you can do with Amazon Redshift in Retool
After you create an Amazon Redshift resource in Retool, you can:
- Read and display data with SQL queries.
- Insert, update, and delete records using GUI mode.
- Build admin panels and dashboards backed by your data warehouse.
- Automate data workflows across your Redshift cluster.
Before you begin
To connect Amazon Redshift to Retool, you need the following:
- Cloud
- Self-hosted
- Redshift cluster: A running Amazon Redshift cluster or serverless workgroup.
- Credentials: A database username and password, or AWS IAM credentials with permissions to generate temporary cluster credentials.
- Network access: Your Redshift cluster must accept connections from Retool's IP addresses.
- Retool permissions: Ability to create and manage resources in your organization.
- Redshift cluster: A running Amazon Redshift cluster or serverless workgroup.
- Credentials: A database username and password, or AWS IAM credentials with permissions to generate temporary cluster credentials.
- Network access: Your Redshift cluster must be reachable from your Retool instance.
- Retool permissions: Ability to create and manage resources in your organization.
Create an Amazon Redshift resource
Follow these steps to create an Amazon Redshift resource in your Retool organization.
Create a new resource
In your Retool organization, navigate to Resources in the main navigation and click Create new → Resource. Search for "Redshift" and click the Amazon Redshift tile to begin configuration.
Use folders to organize your resources by team, environment, or resource type. This helps keep your resource list manageable as your organization grows.
Configure general settings
Specify a name and description for the resource that indicates which Redshift cluster it connects to. The description provides more context to users and Assist about how to use the resource.
| Example name | Example description |
|---|---|
| Analytics warehouse | Redshift cluster containing product analytics and event data. |
| Reporting warehouse (read only) | Read-only Redshift cluster used for BI dashboards. |
Configure resource credentials
Configure the connection settings for your Amazon Redshift resource.

Amazon Redshift resource configuration form.
Host
The hostname of your Redshift cluster.
cluster.au48w6x.us-west-2.redshift.amazonaws.com
Port
The port your Redshift cluster listens on. Defaults to 5439.
Database name
The name of the Redshift database to connect to.
hn_api_production
Configure authentication
Choose an authentication method based on your security requirements.
| Authentication method | Use cases |
|---|---|
| User and password | Standard authentication using a database username and password. |
| AWS IAM authentication | Temporary, short-lived credentials generated through AWS IAM, avoiding long-lived database passwords. |
Option A: User and password (Recommended)
- Set Authentication to User and Password.
- Enter the Database username. The default username for a new cluster is
retool. - Enter the Database password.
Option B: AWS IAM authentication
- Set Authentication to AWS IAM Authentication. Retool automatically enables SSL/TLS for this method.
- Enter the Database username to connect as.
- Enter the Cluster Identifier for your Redshift cluster.
- Enter the AWS Region where your cluster is located.
- Enter an AWS access key ID and AWS secret key ID with permissions to call
GetClusterCredentials, or optionally provide a Role to assume (ARN) to use a different IAM role.
Use SSL/TLS
Configuring SSL/TLS is optional but highly recommended.
Enable Use SSL/TLS for encrypted connections to your Redshift cluster.
Enable SSH tunnel
Connect through an SSH tunnel to reach Redshift clusters in private networks. Enter the SSH host, port, username, and private key for your bastion server.
Configure advanced options
Configure optional settings available under the Advanced options section of the resource configuration form.
Disable converting queries to prepared statements
Retool converts queries to prepared statements by default to improve performance and prevent SQL injection. Enable this option only if your use case requires disabling that behavior.
Show write GUI mode only
Enable this to hide SQL mode from query writers, restricting them to GUI mode for write operations. Use this to reduce the risk of unintended data modifications.
- Cloud
Outbound region
If your organization uses outbound regions, select the region that should be used for requests to Redshift. This controls which geographic region your requests originate from.
Test the connection
Click Test connection to verify Retool can connect to Redshift. If the test fails, check the following:
- Network access: Ensure your Redshift cluster accepts connections from Retool's IP addresses (cloud) or your Retool instance's network (self-hosted).
- Credentials: Verify the username and password, or AWS IAM permissions, are correct and haven't expired.
- Hostname and port: Confirm the hostname is correct and Redshift is listening on the specified port.
- SSL/TLS: If your cluster requires SSL, enable Use SSL/TLS.
After testing the connection, click View in console to open the Debug Tools console. The console displays the test query executed, its response, execution time, and error details if the test fails. This information is helpful for troubleshooting connection issues.
Save the resource
Click Create resource to save your Amazon Redshift resource. You can now use it in queries across your Retool apps and automations.
Interact with Amazon Redshift data
Once you've created an Amazon Redshift resource, you can interact with Redshift data using Retool.
Retool recommends using the new app builder so you can use natural language to build React-based apps using AI.
- To use Amazon Redshift data in the app builder, reference the resource in the prompt with
@, such as@Analytics warehouse. Refer to the data and functions documentation to learn more. - For classic apps, workflows, and agents, refer to the SQL queries documentation to learn how to write a resource query.
Best practices
Follow these best practices to maintain the security of your Amazon Redshift resource.
- Apply least privilege: Grant database users only the minimum permissions needed. Use read-only credentials for resources used only for reading data.
- Prefer AWS IAM authentication: Use AWS IAM authentication instead of a long-lived database password where possible, since IAM-generated credentials are temporary and automatically rotated.
- Enable SSL/TLS: Use SSL/TLS encryption for connections to protect data in transit, especially when connecting over the internet.
- Use resource environments: Configure multiple resource environments to maintain separate Redshift clusters or credentials for production, staging, and development.
Related resources
Create a resource
Learn how to create and manage resources in Retool.
Resource environments
Configure separate credentials for production and non-production environments.
Connect to BigQuery
Connect to another cloud data warehouse.
Retool community: Amazon Redshift
Community discussions and solutions for Amazon Redshift integrations.
Amazon Redshift documentation
Official AWS Redshift documentation.