IAM Auth

1

Create the IAM Database User

MySQL or MariaDB

CREATE USER teleskope IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';

Postgres

CREATE USER teleskope; 
GRANT rds_iam TO teleskope;
2

Grant DB User Permissions

MySQL or MariaDB

GRANT SHOW DATABASES, SELECT ON *.* TO teleskope

Postgres versions 14+

GRANT pg_read_all_data TO teleskope

Postgres versions < 14

SELECT format('GRANT CONNECT ON DATABASE %I TO teleskope;', datname) FROM pg_database \gexec
SELECT format('GRANT USAGE ON SCHEMA %I TO teleskope;', nspname) FROM pg_namespace \gexec
SELECT format('GRANT SELECT ON ALL TABLES IN SCHEMA %I TO teleskope;', nspname) FROM pg_namespace \gexec
3

Enable IAM Auth

  1. Enable IAM Auth for the RDS Cluster.

  2. Provide the Teleskope IAM role in the AWS account with the following permission for your database:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "rds-db:connect"
      ],
      "Resource": [
        "arn:aws:rds-db:{REGION}:{ACCOUNT_ID}:dbuser:{DB_RESOURCE_ID}/{DB_USER}"
      ]
    }
  ]
}
4

Submit the Username in the Teleskope interface

Last updated

Was this helpful?