Redshift
Requirements
Name
Description
1
Grant Teleskope IAM Access to Redshift
Terraform
resource "aws_iam_role_policy_attachment" "redshift_read_policy" {
role = "TeleskopeRole"
policy_arn = "arn:aws:iam::aws:policy/AmazonRedshiftReadOnlyAccess"
}
resource "aws_iam_role_policy_attachment" "redshift_data_policy" {
role = "TeleskopeRole"
policy_arn = "arn:aws:iam::aws:policy/AmazonRedshiftDataFullAccess"
}2
Teleskope Database User
Create Database User
CREATE USER teleskope WITH PASSWORD '****PASSWORD****'CREATE USER teleskope WITH SYSLOG ACCESS UNRESTRICTED;aws redshift associate-iam-roles \ --cluster-identifier my-redshift-cluster \ --iam-role-arn arn:aws:iam::<account-id>:role/TeleskopeRole
Grant Read Access
GRANT SELECT ON svv_all_schemas TO teleskope_ro;
GRANT SELECT ON svv_table_info TO teleskope_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA pg_catalog
-- Grant select to each Redshift schema
GRANT USAGE ON SCHEMA {schema} TO teleskope;
GRANT SELECT ON ALL TABLES IN SCHEMA {schema} TO teleskope;Grant Write Access
GRANT UPDATE, DELETE ON ALL TABLES IN SCHEMA {schema} TO teleskope;SSH Tunnel (Optional)
echo "<TELESKOPE_PUBLIC_KEY>" >> ~/.ssh/authorized_keyschmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
Last updated
Was this helpful?
