Amazon Redshift Setup
Follow these steps to set up IAM credentials for BonData.Step 1: Create an IAM User
- Go to AWS IAM Console
- Click Users → Create user
- Enter a name (e.g.,
bondata-redshift) - Click Next → Attach policies directly
Step 2: Attach Permissions
Create a policy with these permissions:Step 3: Create Access Keys
- Go to your new user → Security credentials
- Click Create access key
- Select Third-party service → Next
- Copy the Access Key ID and Secret Access Key
Step 4: Get Cluster Details
- Cluster Identifier: Found in Redshift console (e.g.,
my-cluster) - AWS Region: The region of your cluster (e.g.,
us-east-1) - Workgroup: For Serverless Redshift only
Step 5: Grant Database Permissions
AWS IAM only controls access to the Redshift Data API — it does not grant access to your tables. The Db User you connect as also needs read permissions inside Redshift. For every schema you want to sync, grant the userUSAGE on
the schema and SELECT on its tables:
Tables built by dbt (or anything that rebuilds a table)
Grants live on the table object, not its name. If a table is produced by dbt — or any pipeline that recreates it on each run (atable materialization,
a full refresh, CREATE TABLE AS, a create-then-swap) — the rebuild drops the old
object and creates a new one with no grants. A one-time GRANT SELECT you ran
by hand disappears on the very next run and the table becomes unreadable again.
Pick one durable fix:
1. Grant from dbt (recommended). Add a grants
config so dbt re-applies SELECT every time it rebuilds the table. In the model’s
.sql file:
dbt_project.yml:
role:bondata_role or group:bondata_group.
2. Redshift scoped permissions. Grant on all current and future tables in
the schema, no matter which user creates them — no dbt change required: