Shape
Search…
Redshift
Remember to Whitelist IP access to your database if it is behind a firewall.

Connection Credentials

Use the following credentials to connect to your Redshift database:
  1. 1.
    Host: The hostname for this server. Please ensure to whitelist Shape's IP to connect to this host.
  2. 2.
    Port: The port that your Redshift runs on. By default, this is 5439.
  3. 3.
    Username: The username to connect to.
  4. 4.
    Password: The password for this user.
  5. 5.
    Database: The name of the database that Shape should connect to.
  6. 6.
    Schema: The schema to read from.
You may need to Enable Public Access from the AWS console.

Creating a read-only user

If you would like to create a new read-only user in Redshift, here are the commands to run:
-- Create a new Shape user
CREATE USER shape_user WITH PASSWORD 'your-strong-password';
-- Allow the shape user to connect to the public schema (or replace with your chosen schema)
GRANT USAGE ON SCHEMA "public" TO shape_user;
-- Allow shape user to read table on the public schema (or replace with your chosen schema)
REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA "public" FROM shape_user;
GRANT SELECT ON ALL TABLES IN SCHEMA "public" TO shape_user;
-- Allow shape user to access future table on the public schema (or replace with your chosen schema)
ALTER DEFAULT PRIVILEGES IN SCHEMA "public" GRANT SELECT ON TABLES TO shape_user;

Removing the read-only user

If you need to remove the read-only user, reversing the commands above is easy:
-- Revoke default privileges on the public schema (or replace with chosen schema)
ALTER DEFAULT PRIVILEGES IN SCHEMA "public" REVOKE ALL ON TABLES FROM shape_user;
-- Revoke all read access on the public schema (or replace with chosen schema)
REVOKE ALL PRIVILEGES ON ALL TABLES IN SCHEMA "public" FROM shape_user;
-- Revoke schema usage access from public schema (or replace with chosen schema)
REVOKE USAGE ON SCHEMA "public" FROM shape_user;
-- Drop user
DROP USER shape_user;
Copy link
On this page
Connection Credentials
Creating a read-only user
Removing the read-only user