Before you start
Ask your Delphina contact for:- Delphina’s IP addresses, for the bastion’s security group.
- Delphina’s SSH public key, for the bastion user.
- If you use an IAM role: Delphina’s principal ARN and a unique external ID, for the role’s trust policy.
- If you use a password: a secure way to share it.
redshift-serverless (<workgroup>.<account>.<region>.redshift-serverless.amazonaws.com); provisioned endpoints look like <cluster>.<id>.<region>.redshift.amazonaws.com.
Step 1: Set up the bastion host
-
Use an existing bastion or launch a small Linux EC2 instance (for example,
t4g.nanoon Amazon Linux) in a public subnet of your warehouse’s VPC, with an Elastic IP. - In the bastion’s security group, add an inbound rule: TCP 22 from each Delphina IP address.
- In your workgroup’s or cluster’s security group, add an inbound rule: TCP on the warehouse port (default 5439) from the bastion’s security group.
-
On the bastion, create a user for Delphina with no login shell, and add Delphina’s public key:
-
Limit the user to forwarding connections to your warehouse. Add this to the end of
/etc/ssh/sshd_config, where<WAREHOUSE_ENDPOINT>is your workgroup’s or cluster’s endpoint hostname and<PORT>its port:MaxSessions 0blocks shells and commands while still allowing forwarding,AllowTcpForwarding localblocks reverse tunnels, andPermitOpenallows only your warehouse as a destination. Check the configuration, then reload SSH:On Ubuntu and Debian, the service is calledsshinstead ofsshd.
Step 2: Grant database access
Run this as a superuser, such as the admin user created with your workgroup or cluster, connected to the database Delphina will use: the one you send us in Step 4. A Delphina connection reads one database. Use a superuser if you can. A non-superuser needs theCREATE ROLE permission and the right to grant on every schema and table involved, either by owning them or by holding the privileges WITH GRANT OPTION, and can’t set default privileges for other users’ tables (below).
GRANT SELECT ON ALL TABLES only covers tables that exist when you run it. Set default privileges for each user that creates tables in the schema, such as your dbt, Fivetran, or Airflow users. Redshift applies default privileges per creating user, so one statement doesn’t cover everyone.
Give Delphina access to query history. Delphina learns which tables, joins, and metrics matter from how your team queries them. By default, a non-superuser only sees its own queries in Redshift’s query history, so grant the built-in monitoring role. Run this once; it isn’t per database.
Step 3: Set up authentication
Choose one.IAM role (recommended)
- Serverless
- Provisioned
Create an IAM role in the AWS account that owns the workgroup, for example Permissions policy. Replace the placeholders with your region, account ID, and workgroup ID (the UUID in the workgroup ARN).Map the role to the database role. Add a tag to the IAM role with key
delphina-redshift-access.Trust policy. Your Delphina contact provides the Delphina principal ARN and a unique external ID.RedshiftDbRoles and value delphina_role. When Delphina connects, Redshift signs it in as the database user IAMR:delphina-redshift-access and grants it delphina_role.Username/password
Create a database user with a strong password and give it the Delphina role. This is the same on Serverless and provisioned.', ", \, /, @, or spaces.
Share the password with your Delphina contact through a secure channel, never over email or chat.