- 3 Minutes to read
Amazon Redshift as a Target Connection
- 3 Minutes to read
This guide covers creating your initial Amazon Redshift cluster and obtaining the necessary credentials for Rivery integration. By the end, you'll efficiently configure your Redshift cluster in Rivery.
Before using this guide, ensure the following prerequisites are met:
AWS Superuser Account:
Make sure you have signed up for AWS as a Superuser.
Create a Redshift Cluster
- If you don't already have a Redshift cluste, you can create one by following these instructions.
- Once your cluster is created, you need to authorize access to the cluster.
Create Your User and Schema within the Redshift Database
In the Cluster creation wizard in AWS, you must define the database where Rivery will upload data. Follow these steps:
- Connect to your Redshift cluster using the credentials set during cluster creation, using your preferred SQL management tool (e.g., Aginity, SQL Workbench/J or DBeaver).
Make sure the Redshift cluster is externally accessible. Obtain the host address from the Redshift cluster details.
- Create the user and schema by running the following SQL commands (replace "Rivery User" and "schema name" with your desired names):
CREATE USER <Rivery User> with password '<myPwd>' CREATEUSER; CREATE SCHEMA IF NOT EXISTS <schema name> authorization <Rivery User>;
- Grant the necessary permissions to the user by running the following commands:
GRANT SELECT on ALL TABLES IN SCHEMA <schema name> TO <Rivery User>; GRANT EXECUTE on ALL FUNCTIONS IN SCHEMA <schema name> TO <Rivery User>; GRANT USAGE on SCHEMA <schema name> TO <Rivery_User>
Replace "Rivery User" with the user previously created and "schema name" with the schema you grant Rivery permission to utilize. Repeat this process for every schema you wish for Rivery to access and utilize data.
Rivery conducts a review of the Access Control Lists (ACLs) to ensure that these permissions are replicated across all tables. The current Grant permissions found within the raw ACLs are structured as shown below:
In this context, the string "arwdRxtDPA" denotes the permissions granted to the Rivery user. Each character within this string corresponds to a specific action, with 'a' representing INSERT, 'r' representing SELECT, 'w' representing UPDATE, and 'd' representing DELETE.
Rivery interprets this string, generates grant statements, and subsequently executes them individually on the respective tables.
Whitelist Our IPs
To whitelist Rivery's IPs, follow these steps:
- Log in to your AWS account and search for the "Amazon Redshift" service in the AWS Console.
- Access the "clusters" section in the left sidebar.
- Select the cluster you've created.
- Navigate to the "properties" tab and look for "VPC security group" under "Network and security settings." Click on the Security Group ID.
- In the "Inbound rules" tab, click "Edit inbound rules."
- Add a rule of type "Redshift" and specify the required source IP addresses as outlined in the documentation.
- Save the rules to whitelist the specified IPs.
Rivery's Redshift Connection
You can connect to Redshift using one of two methods:
- Login Credentials
- SSH Tunnel
- Whitelist our IPs.
- Choose your Connection Name.
- Enter Host.
- Fill in the Port Number.
- Enter your Username and Password
- Use the Test Connection function to see if your connection is up to the task.
If the connection succeeded, you can now use this connection in Rivery.
SSH Tunnel (Optional)
To connect via SSH Tunnel, follow our step-by-step tutorial.
Rivery allows you to create a custom FileZone to manage your data in your own S3 service. Your data will be stored in your bucket.
To use a custom Filezone, follow the guidelines listed below:
Toggle the Custom File Zone to true.
By clicking on FileZone Connection, you can select the previously configured Amazon S3 Connection.
Choose a Default Bucket from the drop-down list.
Use the Test Connection function to see if your connection is up to the task.
If the connection was successful, click Save.