Set Up
Before You Begin
Make sure you have the following before starting:- Admin access in AWS and Redshift: You’ll need to create an IAM user and policy in AWS, and run grants as an administrator in your Redshift database.
- A Redshift deployment: A Redshift Serverless workgroup or a provisioned cluster.
- The data you want to sync identified: Know which database, and which schemas and tables, Conversion should be able to read from.
Step 1: Set Up Redshift Access
Conversion connects to Redshift through the AWS Redshift Data API using an IAM access key. In this step you’ll create a dedicated IAM user with a policy that allows Data API calls, then create an access key for it.Your cluster can stay private. Conversion uses the AWS Redshift Data API, so you don’t need a public endpoint or an IP allowlist.
Create an IAM User and Policy
We recommend creating a dedicated IAM user for Conversion so its activity is easy to monitor and revoke.- In the AWS console, open IAM → Users → Create user.
- Enter a user name such as
conversion_syncand finish creating the user. - Open the user and go to Permissions → Add permissions → Create inline policy.
- Select JSON and paste the policy below for your Redshift deployment.
- Replace the ARN placeholders with your AWS Region, account ID, and workgroup ID or cluster identifier and database name.
- Review and create the policy with a name such as
ConversionRedshiftSync.
dbname ARN, use the same cluster identifier and the database name you will enter in Conversion.
- Serverless workgroup
- Provisioned cluster
Resource: "*" because they do not support resource-level permissions. Query execution is scoped to your workgroup or cluster. Serverless credentials are scoped to your workgroup; provisioned credentials are scoped to the database in your cluster. See the AWS Data API permissions reference and Redshift permissions reference.
Create an Access Key
- Open the IAM user’s Security credentials tab.
- Under Access keys, click Create access key.
- Choose Application running outside AWS and complete the access key creation flow.
- Save the Access key ID and Secret access key. AWS shows the secret only once. You’ll enter both in Conversion in Step 2.
To rotate your access key, create a new key for the same IAM user and update the credentials in your Conversion connection before deactivating the old key.
Step 2: Connect Redshift to Conversion
- In Conversion, go to Settings → CRM and syncing → Connections.
- Click Add Amazon Redshift connection.
- Fill in the connection details using the values from Step 1:
- Click Create connection.
Step 3: Grant Read Access to Your Data
Redshift maps your IAM user to a database user namedIAM:<iam-user-name>. That user appears after the connection check in Step 2.
In the Amazon Redshift query editor, connect to your target database as an administrator. Replace the schema, table, and IAM user name below, then run:
The table picker lists only tables in schemas where your IAM database user has
USAGE and tables where it has SELECT. If a table is missing, check both grants.Create a Sync
After connecting, open your new Redshift connection and go to the Syncs tab to create a sync. Read more about Setting Up a Sync.Redshift SQL Reference
Column Names
Select each destination field as its own column, named with the field key. Redshift lowercases column names. To keep mixed case, quote the alias and enableenable_case_sensitive_identifier on your cluster.
Every result column needs a unique name. Duplicate or unnamed columns fail the sync even when preview works. Give expressions explicit aliases and rename duplicate columns from joins.
Converting Timestamps
Conversion expects Unix timestamps for date/time fields. UseEXTRACT(EPOCH FROM column)::bigint to convert Redshift TIMESTAMP values to Unix seconds:
Using last_sync_time
See Incremental Syncing for howlast_sync_time works. In Redshift, add it to TIMESTAMP 'epoch' as seconds to compare against a TIMESTAMP column:
Handling NULLs
UseCOALESCE or NVL to provide default values:
Casting Types
UseCAST or :: to convert between types:
Events
Select the contact’s email, event name, event time as Unix seconds in text, and a unique event ID. Quote thetimestamp alias, since timestamp is a reserved word in Redshift:
event_id that is unique across your event syncs so retries can deduplicate events. See Syncing Custom Events from a Warehouse.
Troubleshooting
”Missing permission” errors
AWS or Redshift rejected the IAM user. Check that:- The access key ID and secret access key belong to the same active IAM access key. AWS reports a mismatched or deleted key as an invalid security token.
- For Serverless, the policy grants
redshift-serverless:GetCredentialson the workgroup ARN. For a provisioned cluster, it grantsredshift:GetClusterCredentialsWithIAMon thedbnameARN for your cluster and database. - The database user
IAM:<iam-user-name>hasUSAGEon each schema andSELECTon each table from Step 3, in the database you entered in Conversion.
”Could not connect” errors
Verify that:- The Region is the one containing your workgroup or cluster
- Deployment matches your setup: Serverless for a workgroup, Provisioned for a cluster
- The workgroup name is its name, not its ARN or ID, and the cluster identifier is not an ARN
- The database name exists in that workgroup or cluster
”Workgroup or cluster is starting” errors
A paused or resuming workgroup or cluster rejects queries until it’s available. Wait for it to become available, then try again.Previews work but syncs fail
Sync queries need unique, named columns. See Column Names.”The query result is too large. Add a filter or a LIMIT.” errors
Add a{{last_sync_time}} filter to limit the query to changed rows.
Sync taking too long
For general tips, see Sync Taking Too Long.Frequently Asked Questions
What Redshift permissions does Conversion need?
What Redshift permissions does Conversion need?
The IAM user needs the Data API and credentials actions in the IAM policy. Its database user needs
USAGE on the schemas and SELECT on the tables you want to sync. See Grant Read Access to Your Data. Conversion only reads your tables. Each sync also creates a temporary table that Redshift drops when the sync ends; Redshift lets every database user create temporary tables by default.Why doesn't Conversion ask for a database password?
Why doesn't Conversion ask for a database password?
Conversion uses the Data API with IAM authentication. You provide an IAM access key and grant database access to its mapped user.
Does syncing use Redshift compute?
Does syncing use Redshift compute?
Yes. Each sync runs your query and retrieves the results in pages through the Data API. Serverless compute is billed per second with a 60-second minimum charge. See that AWS page for how the minimum applies.
How do I sync from multiple schemas?
How do I sync from multiple schemas?
Grant
USAGE and SELECT on each schema and use schema-qualified table names in your query: