Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added section about profiles on the page about connecting to redshif via IAM #238

Merged
merged 4 commits into from
Jul 13, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions website/docs/docs/supported-databases/profile-redshift.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ my-redshift-db:
cluster_id: [cluster_id]
host: hostname.region.redshift.amazonaws.com
user: alice
iam_duration_seconds: 900 # optional
autocreate: true # optional
db_groups: ['analysts'] # optional
iam_profile: data_engineer # optional
iam_duration_seconds: 900 # optional
autocreate: true # optional
db_groups: ['analysts'] # optional

# Other Redshift configs:
port: 5439
Expand All @@ -71,6 +72,31 @@ my-redshift-db:

</File>

Ideally, the region and access keys should be configured in the usual `~/.aws` folder,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a header above this line like:

### Specifying an IAM Profile

:::info New in dbt v0.18.0
The `iam_profile` config option for Redshift profiles is new in dbt v0.18.0
:::

via profiles you can then specify using the `iam_profile` option.

A sample `~/.aws/config` file would be:
<File name='~/.aws/config.yml'>

```
[profile data_engineer]
role_arn=arn:aws:iam::<you-account-id>:role/Data_Engineer
region = eu-west-1
source_profile = default
```

</File>
where the `source_profile` would be the profile that holds the access credentials, set in the `~/.aws/credentials` file

<File name='~/.aws/config.yml'>

```
[default] # 'default' profile
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea here that the data_engineer profile above is pointing back to the default profile for access keys? I think I don't totally understand the purpose of these docs, and I question if they're relevant enough to dbt to include here. If there's an external resource we can link out to that provides best practices around how to configure an .aws/config file, I'd be supportive of linking out to it here.

aws_access_key_id=<access-key>
aws_secret_access_key=<secret-access-key>
```
</File>

brunomurino marked this conversation as resolved.
Show resolved Hide resolved
## Redshift notes

Where possible, dbt enables the use of `sort` and `dist` keys. See the section on [Redshift specific configurations](redshift-configs).