If you decide to use Redshift as your data warehouse you must use s3 as your filestore, please see our documentation on creating an s3 bucket in order to set this up.
To get started with the Amazon Redshift console, watch the following video from amazon.
Ensure you select a size appropriate for your expected data volumes.
- Open the AWS redshift console
- Select the region your cluster is deployed
- In the left menu bar, click Clusters.
- Select the cluster you want Kleene app to connect.
- Click on the copy Icon next to endpoint so you can view the full url.
- Save the Port the database is operating on as you will need this for your setup, it is usually 5439. - example - dev-redshift..eu-west-1.redshift.amazonaws.com:5439/dev
- You will also have to input the host name in the Kleene app setup this is the endpoint without the port and database at the end, from the example above this would be: dev-redshift..eu-west-1.redshift.amazonaws.com
- Open the AWS redshift console
- Select the cluster —> click on Properties Tab
- Scroll to the Network and security section and click on security group to open it.
- In the above security group, click Inbound rules tab followed by click on Edit inbound Rules
- Click Add Rule —> Select Redshift from the dropdown under Type and enter the following Kleene IPs in separate rules to allow Kleene app to connect to Redshift Cluster:
- Click Save rules.
We recommend that you create a “Limited user”, as master username inherently has the CREATE permissions. A kleene.ai app user/password on Redshift that has permissions to create schemas and tables. The app will create the schemas and tables it needs.
- Connect to RedShift cluster either using query editor on AWS console .
When you enter the query editor you will be prompted to connect to connect to a database, connect to the database you created when creating the cluster.
- The Kleene app uses password authentication. Execute the following query to create a user called “eltuser”. Replace with a password of your choice.
CREATE USER eltuser PASSWORD with '<password>' createdb;
- You now need to grant all privileges to this user so they are able to create schemas, write tables.
GRANT ALL on DATABASE <dbname> to eltuser
- Query the PG_USER_INFO catalog table to view details about all database users.
select * from pg_user_info;
In order to setup in the Kleene app you will need to know:
- You can find this as outlined above in the cluster Endpoint.
- You can find this as well in the cluster Endpoint.
- Database Name
- This was the name you gave the database when creating the cluster. ‘dev’ in the example.
- Database User
- This was the username you assigned. ‘eltuser’ in the example.
- Database Password
- This was the password assigned to user.
- s3 setup
- If you have an s3 bucket setup fill in these details, if you need to set one up see the section on s3 below.
- It is recommended you set up your s3 bucket in the same region as your redshift cluster.
If you have deployed your Redshift cluster on private subnets you must enable Enhanced VPC routing. When you use Amazon Redshift enhanced VPC routing, Amazon Redshift forces all COPY and UNLOAD traffic between your cluster and your data repositories through your virtual private cloud (VPC).
1. navigate to your **cluster** --> **properties**
2. click edit under **Network and security settings**
3. Select the radio button for "Turn on" for the option Enhanced VPC routing.
You must create VPC endpoint type “Gateway” to allow access to the S3 buckets.
- Navigate to Amazon VPC console.
- Select Endpoints and click **Create Endpoint**
- Select AWS services in Service category
- In the Services section, select S3 - type “Gateway”
- Select the VPC and the Route Table Id associated with the VPC
- Select Full access under Policy
- Add Tags (optional) if needed or tags can be skipped.
- Click Create endpoint
Updated 3 months ago