

 Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026. We will start enforcing it in phases. For more information on the details of Python end of life and migration options, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/) that was published on June 30, 2025. 

# Setting up trusted identity propagation for IAM

Setting up trusted identity propagation for IAM has two parts. An identity administrator turns it on in IAM. A database administrator then optionally chooses how Amazon Redshift uses the identity. Until you change the Amazon Redshift settings, every cluster and namespace uses the **Default** mode, which keeps existing workloads unchanged. For IAM configuration details, see [Trusted identity propagation with IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_tip.html) in the *IAM User Guide*.

## Prerequisites
<a name="redshift-iam-access-control-tip-setup-prerequisites"></a>
+ An identity provider (IdP) federated into AWS through SAML 2.0 or OpenID Connect (OIDC), such as Okta, Microsoft Entra ID, or Ping Identity.
+ A provisioned cluster, Amazon Redshift Serverless namespace, or Amazon Redshift Serverless workgroup on a supported version. For more information, see [Before you start using trusted identity propagation for IAM](redshift-iam-access-control-tip-considerations.md).
+ Permissions to administer IAM identity providers and roles for the identity administrator.
+ Superuser or the `CREATE USER` or `ALTER USER` system permission in Amazon Redshift for the database administrator.
+ To use directory groups, an IAM Identity Center instance with users and groups provisioned from your IdP, and network access from Amazon Redshift to IAM Identity Center. For the IAM setup, see [Configure group-based access for trusted identity propagation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_tip_federation_configure_group_access.html) in the *IAM User Guide*.

## Step 1: Turn on trusted identity propagation in IAM
<a name="redshift-iam-access-control-tip-setup-iam"></a>

The identity administrator completes this step in the IAM console.

1. Open the IAM identity provider that your workforce uses and turn on trusted identity propagation.

1. Choose the template for your IdP, and confirm the subject attribute. Amazon Redshift uses the subject as the IdP user's database user name, so choose the attribute that you want to use in `GRANT` statements, typically email.

For detailed instructions, see [Getting started with trusted identity propagation for IAM federation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_tip_federation_getting_started.html) in the *IAM User Guide*.

After this step, connections through this IdP carry the user's identity. Amazon Redshift records the IdP user in the connection log and, when the IAM role has no applicable database user, creates a database user for the IdP user. Existing workloads that sign in as an IAM role user are unchanged. No further step is required.

## Step 2: Choose the account identity federation mode
<a name="redshift-iam-access-control-tip-setup-account"></a>

This step is optional. The account setting applies to every cluster and namespace in the AWS Region that doesn't override it.

**To set the account mode using the console**

1. Open the [Amazon Redshift console](https://console.aws.amazon.com/redshiftv2/).

1. Under **Identity and Permissions**, choose **IAM Trusted Identity Propagation**.

1. In **Account setting**, choose **Edit account setting**.

1. For **Identity federation**, choose **Default**, **Federate users**, or **Federate users and groups**.

1. Optionally, under **System roles**, select the system roles that IdP groups can grant. Leave every role unselected to allow none. For more information, see [Mapping identity provider groups to Amazon Redshift roles](https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-tip-groups.html).

1. Choose **Save**.

**To set the account mode using the AWS CLI**  
Use the following example.

```Bash
aws redshift modify-account-attributes \
  --identity-configuration '{
    "IdentityFederation": { "Mode": "FEDERATED_WITH_GROUPS" },
    "SystemRolesFederation": { "Roles": ["sys:operator"] }
  }'
```

To view the account settings, use `aws redshift describe-account-attributes`.

## Step 3: Override the mode for a cluster or namespace
<a name="redshift-iam-access-control-tip-setup-resource"></a>

This step is optional. A cluster or namespace can use its own identity federation mode and its own system roles list. Each setting either uses the account value or uses its own value. A resource value replaces the account value. The values aren't combined.

**To override the mode using the console**

1. In the Amazon Redshift console, under **Identity and Permissions**, choose **IAM Trusted Identity Propagation**.

1. Under **Resource settings**, select the provisioned cluster or Amazon Redshift Serverless namespace, and then choose **Edit resource setting**.

1. To use a resource-specific value, select **Override** under **Identity federation** or **System roles**. Otherwise, leave **Override** cleared to inherit the account setting.

1. Choose **Save**.

You can also open a provisioned cluster and choose **Edit resource settings** under **IAM Trusted Identity Propagation resource setting**. For Amazon Redshift Serverless, open **Namespace configuration**, choose the **Security and encryption** tab, and use the same section.

**To override the mode using the AWS CLI**  
Use the following example for a provisioned cluster.

```Bash
aws redshift modify-cluster \
  --cluster-identifier analytics \
  --identity-configuration '{
    "IdentityFederation": { "Mode": "FEDERATED", "Inherited": false },
    "SystemRolesFederation": { "Inherited": true }
  }'
```

Use the following example for Amazon Redshift Serverless.

```Bash
aws redshift-serverless update-namespace \
  --namespace-name analytics \
  --identity-configuration '{
    "identityFederation": { "mode": "FEDERATED", "inherited": false },
    "systemRolesFederation": { "inherited": true }
  }'
```

`DescribeClusters` and `GetNamespace` return the effective value and whether it comes from the resource or the account.

## Step 4: Set individual users with SQL
<a name="redshift-iam-access-control-tip-setup-users"></a>

This step is optional. You can bind an individual user to an IdP user, with or without groups, regardless of the cluster mode. For more information, see [Federating individual users with SQL](redshift-iam-access-control-tip-federate-users.md).

## Step 5: Verify the configuration
<a name="redshift-iam-access-control-tip-setup-verify"></a>

1. After connecting to the cluster through your IdP as a test user, run `SELECT current_user;` to see which identity the session runs as.

1. Query the connection log to see both identities.

   ```SQL
   SELECT recordtime, username, associated_identity
   FROM stl_connection_log
   WHERE associated_identity <> ''
   ORDER BY recordtime DESC
   LIMIT 10;
   ```

   The following example shows a session that runs as the IdP user and records the IAM role user as the associated identity.

   ```
   recordtime                  | username          | associated_identity
   ----------------------------+-------------------+--------------------
   2026-11-24 18:42:11.123456  | alice@example.com | IAMR:Analyst
   ```