AWS Security ChangesHomeSearch

AWS redshift medium security documentation change

Service: redshift · 2025-11-16 · Security-related medium

File: redshift/latest/mgmt/generating-iam-credentials-steps.md

Summary

Updated documentation to include new `GetClusterCredentialsWithIAM` API operation alongside existing `GetClusterCredentials`, revised IAM policy examples, and clarified authentication method differences.

Security assessment

The change introduces `GetClusterCredentialsWithIAM`, which uses IAM roles for automatic database user mapping, improving security by centralizing permissions at the IAM level. Updated policy examples enforce resource-specific permissions (e.g., restricting to specific clusters/databases) and warn against overly permissive wildcards. The explicit guidance on validating `DbUser` via IAM conditions directly addresses credential security.

Diff

diff --git a/redshift/latest/mgmt/generating-iam-credentials-steps.md b/redshift/latest/mgmt/generating-iam-credentials-steps.md
index 369c7ec72..bd6ff2edf 100644
--- a//redshift/latest/mgmt/generating-iam-credentials-steps.md
+++ b//redshift/latest/mgmt/generating-iam-credentials-steps.md
@@ -5 +5 @@
-Step 1: Create an IAM role for IAM single sign-on accessStep 2: Configure SAML assertions for your IdPStep 3: Create an IAM role with permissions to call GetClusterCredentialsStep 4: Create a database user and database groupsStep 5: Configure a JDBC or ODBC connection to use IAM credentials
+Step 1: Create an IAM role for IAM single sign-on accessStep 2: Configure SAML assertions for your IdPStep 3: Create an IAM role with permissions to call GetClusterCredentialsWithIAM or GetClusterCredentialsStep 4: Create a database user and database groupsStep 5: Configure a JDBC or ODBC connection to use IAM credentials
@@ -23 +23 @@ At a high level, the process flows as follows:
-  3. Step 3: Create an IAM role with permissions to call GetClusterCredentials
+  3. Step 3: Create an IAM role with permissions to call GetClusterCredentialsWithIAM or GetClusterCredentials
@@ -58 +58 @@ If you use an IAM policy variable `${redshift:DbUser}`, as described in [Resourc
-To help secure this configuration, we recommend that you use a condition in an IAM policy to validate the `DbUser` value by using `RoleSessionName`. You can find examples of how to set a condition using an IAM policy in [Example policy for using GetClusterCredentials](./redshift-iam-access-control-identity-based.html#redshift-policy-examples-getclustercredentials).
+To help secure this configuration, we recommend that you use a condition in an IAM policy to validate the `DbUser` value by using `RoleSessionName`. You can find examples of how to set a condition using an IAM policy in [Example 8: IAM policy for using GetClusterCredentials](./redshift-iam-access-control-identity-based.html#redshift-policy-examples-getclustercredentials).
@@ -93 +93 @@ This element contains one or more `AttributeValue` elements. Set each `Attribute
-## Step 3: Create an IAM role with permissions to call GetClusterCredentials
+## Step 3: Create an IAM role with permissions to call GetClusterCredentialsWithIAM or GetClusterCredentials
@@ -95 +95 @@ This element contains one or more `AttributeValue` elements. Set each `Attribute
-Your SQL client needs authorization to call the `GetClusterCredentials` operation on your behalf. To provide that authorization, you create a user or role and attach a policy that grants the necessary permissions.
+Your SQL client needs authorization to call the the ` GetClusterCredentialsWithIAM` or `GetClusterCredentials` operation on your behalf. To provide that authorization, you create a user or role and attach a policy that grants the necessary permissions. Both operations are available for obtaining the cluster credentials, but they differ in their authentication method. ` GetClusterCredentialsWithIAM` uses an IAM role, automatically creating a database user that maps to the role, which is beneficial for managing permissions at the IAM role level, while `GetClusterCredentials` gives credentials for a given username in the database. 
@@ -97 +97 @@ Your SQL client needs authorization to call the `GetClusterCredentials` operatio
-###### To create an IAM role with permissions to call GetClusterCredentials
+###### To create an IAM role with permissions to call GetClusterCredentialsWithIAM
@@ -101,31 +101 @@ Your SQL client needs authorization to call the `GetClusterCredentials` operatio
-  2. Attach a permission policy with permission to call the `redshift:GetClusterCredentials` operation. Depending on which optional parameters you specify, you can also allow or restrict additional actions and resources in your policy:
-
-     * To permit your SQL client to retrieve cluster ID, AWS Region, and port, include permission to call the `redshift:DescribeClusters` operation with the Redshift cluster resource. 
-
-     * If you use the `AutoCreate` option, include permission to call `redshift:CreateClusterUser` with the `dbuser` resource. The following Amazon Resource Name (ARN) specifies the Amazon Redshift `dbuser`. Replace ``region``, ``account-id``, and ``cluster-name`` with the values for your AWS Region, account, and cluster. For ``dbuser-name``, specify the user name to use to log in to the cluster database. 
-        
-                arn:aws:redshift:region:account-id:dbuser:cluster-name/dbuser-name
-                                
-
-     * (Optional) Add an ARN that specifies the Amazon Redshift `dbname` resource in the following format. Replace ``region``, ``account-id``, and ``cluster-name`` with the values for your AWS Region, account, and cluster. For ``database-name``, specify the name of a database that the user will log in to. 
-        
-                arn:aws:redshift:region:account-id:dbname:cluster-name/database-name
-                                
-
-     * If you use the `DbGroups` option, include permission to call the `redshift:JoinGroup` operation with the Amazon Redshift `dbgroup` resource in the following format. Replace ``region``, ``account-id``, and ``cluster-name`` with the values for your AWS Region, account, and cluster. For ``dbgroup-name``, specify the name of a user group that the user joins at login.
-        
-                arn:aws:redshift:region:account-id:dbgroup:cluster-name/dbgroup-name
-
-
-
-
-For more information and examples, see [Resource policies for GetClusterCredentials](./redshift-iam-access-control-identity-based.html#redshift-policy-resources.getclustercredentials-resources).
-
-The following example shows a policy that allows the IAM role to call the `GetClusterCredentials` operation. Specifying the Amazon Redshift `dbuser` resource grants the role access to the database user name `temp_creds_user` on the cluster named `examplecluster`.
-
-JSON
-    
-
-****
-    
-    
+  2. Attach a permission policy with permission to call the ` redshift:GetClusterCredentialsWithIAM` operation. The following policy sample shows options to allow the operation for specific cluster and database, any database in cluster, and any database in any cluster. 
@@ -135 +105,17 @@ JSON
-      "Statement": {
+        "Statement": [
+            {
+                "Sid": "SpecificClusterAndDBName",
+                "Effect": "Allow",
+                "Action": "redshift:GetClusterCredentialsWithIAM",
+                "Resource": [
+                    "arn:aws:redshift:us-east-1:123456789012:dbname:testcluster/testdatabase"
+                ]
+            },
+            {
+                "Sid": "SpecificClusterAndAnyDBName",
+                "Effect": "Allow",
+                "Action": "redshift:GetClusterCredentialsWithIAM",
+                "Resource": "arn:aws:redshift:us-east-1:123456789012:dbname:examplecluster/*",
+            },
+            {
+                "Sid": "AnyClusterAnyDatabase",
@@ -137,2 +123,2 @@ JSON
-        "Action": "redshift:GetClusterCredentials",
-        "Resource": "arn:aws:redshift:us-west-2:123456789012:dbuser:examplecluster/temp_creds_user"
+                "Action": "redshift:GetClusterCredentialsWithIAM",
+                "Resource": "*"
@@ -139,0 +126 @@ JSON
+        ]
@@ -143 +129,0 @@ JSON
-You can use a wildcard (*) to replace all, or a portion of, the cluster name, user name, and database group names. The following example allows any user name beginning with `temp_` with any cluster in the specified account.
@@ -145 +130,0 @@ You can use a wildcard (*) to replace all, or a portion of, the cluster name, us
-###### Important
@@ -147,3 +132 @@ You can use a wildcard (*) to replace all, or a portion of, the cluster name, us
-The statement in the following example specifies a wildcard character (*) as part of the value for the resource so that the policy permits any resource that begins with the specified characters. Using a wildcard character in your IAM policies might be overly permissive. As a best practice, we recommend using the most restrictive policy feasible for your business application. 
-
-JSON
+###### To create an IAM role with permissions to call GetClusterCredentials
@@ -150,0 +134 @@ JSON
+  1. Using the IAM service, create a user or role. You can also use an existing user or role. For example, if you created an IAM role for identity provider access, you can attach the necessary IAM policies to that role. 
@@ -152 +136 @@ JSON
-****
+  2. Attach a permission policy with permission to call the `redshift:GetClusterCredentials` operation. Depending on which optional parameters you specify, you can also allow or restrict additional actions and resources in your policy:
@@ -153,0 +138 @@ JSON
+     * To permit your SQL client to retrieve cluster ID, AWS Region, and port, include permission to call the `redshift:DescribeClusters` operation with the Redshift cluster resource. 
@@ -154,0 +140 @@ JSON
+     * If you use the `AutoCreate` option, include permission to call `redshift:CreateClusterUser` with the `dbuser` resource. The following Amazon Resource Name (ARN) specifies the Amazon Redshift `dbuser`. Replace ``region``, ``account-id``, and ``cluster-name`` with the values for your AWS Region, account, and cluster. For ``dbuser-name``, specify the user name to use to log in to the cluster database. 
@@ -156,8 +142 @@ JSON
-    {
-      "Version":"2012-10-17",		 	 	 
-      "Statement": {
-        "Effect": "Allow",
-        "Action": "redshift:GetClusterCredentials",
-        "Resource": "arn:aws:redshift:us-west-2:123456789012:dbuser:*/temp_*"
-      }
-    }
+                arn:aws:redshift:region:account-id:dbuser:cluster-name/dbuser-name
@@ -166 +145 @@ JSON
-The following example shows a policy that allows the IAM role to call the `GetClusterCredentials` operation with the option to automatically create a new user and specify groups the user joins at login. The `"Resource": "*" `clause grants the role access to any resource, including clusters, database users, or user groups.
+     * (Optional) Add an ARN that specifies the Amazon Redshift `dbname` resource in the following format. Replace ``region``, ``account-id``, and ``cluster-name`` with the values for your AWS Region, account, and cluster. For ``database-name``, specify the name of a database that the user will log in to. 
@@ -168 +147 @@ The following example shows a policy that allows the IAM role to call the `GetCl
-JSON
+                arn:aws:redshift:region:account-id:dbname:cluster-name/database-name
@@ -171 +150 @@ JSON
-****
+     * If you use the `DbGroups` option, include permission to call the `redshift:JoinGroup` operation with the Amazon Redshift `dbgroup` resource in the following format. Replace ``region``, ``account-id``, and ``cluster-name`` with the values for your AWS Region, account, and cluster. For ``dbgroup-name``, specify the name of a user group that the user joins at login.
@@ -172,0 +152 @@ JSON
+                arn:aws:redshift:region:account-id:dbgroup:cluster-name/dbgroup-name
@@ -175,12 +154,0 @@ JSON
-    {
-      "Version":"2012-10-17",		 	 	 
-      "Statement": {
-        "Effect": "Allow",
-        "Action": [
-                 "redshift:GetClusterCredentials",
-                 "redshift:CreateClusterUser",
-    		"redshift:JoinGroup"
-                ],
-        "Resource": "*"
-      }
-    }
@@ -189 +157 @@ JSON
-For more information, see [Amazon Redshift ARN syntax](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-redshift).
+For more information and examples, see [Resource policies for GetClusterCredentials](./redshift-iam-access-control-identity-based.html#redshift-policy-resources.getclustercredentials-resources).