Connect your app to Amazon Redshift
Connect your Lovable app to Amazon Redshift to query your data warehouse and build dashboards or reports. Queries run through AWS Redshift Data API, keeping your cloud credentials secure on the server.
Anyone who needs to build custom dashboards, internal tools, or reports directly on top of their Amazon Redshift data warehouse.
Do this, in order
- 1
Create a dedicated IAM user in your AWS IAM console with permissions for the Redshift Data API and credential retrieval.
Lovable needs permission to run SQL queries and fetch results on your behalf without using root credentials.
- 2
Generate an Access Key ID and Secret Access Key for the new IAM user and save them securely.
These keys act as the authentication credentials needed to configure the connection inside Lovable.
- 3
Go to Connectors in Lovable, select Amazon Redshift, and click Connect.
This starts the connection configuration flow in your Lovable workspace.
- 4
Select your deployment type (Serverless or Provisioned cluster), select your AWS region, paste your access keys, and enter your target database and workgroup or cluster identifier.
Lovable injects these targets as environment variables so your app queries the correct Redshift resources.
- 5
Click Connect, configure sharing options for your workspace if needed, and link the connection to your project.
This allows your project chat and app code to access the Redshift connector.
- 6
Log into your Redshift SQL query editor as a superuser and grant SELECT permissions on your schemas to the connection's database identity.
AWS IAM does not block destructive SQL statements; only database-level permissions enforce true read-only access.
Paste this into your project
Use Amazon Redshift and build a dashboard that shows daily revenue and active users from our warehouse.
Words decoded
- Data warehouse
- A specialized database designed for analyzing massive volumes of business data rather than processing day-to-day app transactions.
- IAM (Identity and Access Management)
- Amazon's security system that defines which services, users, and tools have permission to perform actions in your AWS account.
- Serverless workgroup
- A Redshift configuration where Amazon automatically scales compute resources up and down without requiring you to manage specific servers.
- Provisioned cluster
- A traditional Redshift setup where you choose and pay for specific dedicated database server instances.
Where people get stuck
- AWS IAM policies do not restrict write commands like DROP TABLE; you must set read-only grants inside Redshift itself.
- A successful test connection only confirms the IAM credentials work; it does not check if the cluster, workgroup, or database name actually exists.
- If using a provisioned cluster with a custom database user, you must create that user in Redshift before running queries or authentication will fail.
- When writing Redshift SQL to grant permissions to an IAM-derived identity, you must double-quote the user name (such as "IAM:lovable-redshift") to prevent syntax errors.
- Default Redshift databases grant CREATE on public schemas and TEMP permissions to all users, so you must explicitly revoke them if you want strict read-only access.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.