Using IAM authentication to generate database user credentials
Amazon Redshift allows you to programmatically generate temporary database user credentials that can be used for automated scripts connect to the cluster. Using the get-cluster-credentials
command in the AWS Command Line Interface (AWS CLI) and the GetClusterCredentials
in the API, you can generate the temporary credentials that can then be used in the JDBC and ODBC options.
Getting ready
To complete this recipe, you will need the following setup:
- An IAM user with access to Amazon Redshift and AWS IAM
- An Amazon Redshift cluster deployed in AWS Region
eu-west-1
; we will reference the cluster ID as [Your
-Redshift_Cluster
] - Amazon Redshift cluster masteruser credentials
- Access to any SQL interface such as a SQL client or the Amazon Redshift Query Editor
- The AWS CLI configured on your local client
How to do it
In this recipe, we will generate temporary credentials to connect to the Amazon...