Redshift

Authentication Methods

Password-based authentication

~/.dbt/profiles.yml
company-name:
target: dev
outputs:
dev:
type: redshift
host: [hostname]
user: [username]
pass: [password]
port: [port]
dbname: [database name]
schema: [dbt schema]
threads: [1 or more]
keepalives_idle: 0 # default 0, indicating the system default
search_path: [optional, override the default Redshift search_path]

IAM Authentication

To set up a Redshift profile using IAM Authentication, set the method parameter to iam as shown below. Note that a password is not required when using IAM Authentication. For more information on this type of authentication, consult the Redshift Documentation on generating user credentials with IAM Auth.

If you receive the "You must specify a region" error when using IAM Authentication, then your aws credentials are likely misconfigured. Try running aws configure to set up AWS access keys, and pick a default region.

~/.dbt/profiles.yml
my-redshift-db:
target: dev
outputs:
dev:
type: redshift
method: iam
cluster_id: [cluster_id]
host: [hostname]
user: [username]
port: [port]
dbname: [database name]
schema: [dbt schema]
threads: [1 or more]
keepalives_idle: 0 # default 0, indicating the system default
search_path: [optional, override the default Redshift search_path]

Redshift notes

Where possible, dbt enables the use of sort and dist keys. See the section on Redshift specific configurations.