

 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. 

# Before you start using trusted identity propagation for IAM

Review this page before you turn on [Workforce identity with Trusted Identity Propagation for IAM](redshift-iam-access-control-tip.md). This page describes the prerequisites, the scope and limitations of the feature, and how Amazon Redshift maps a federated user to a database user. If a user signs in as an unexpected database user or loses access, start here.

## Prerequisites
<a name="redshift-iam-access-control-tip-considerations-prerequisites"></a>

You need all of the following before users can sign in with their own identity.
+ Your provisioned cluster or Amazon Redshift Serverless workgroup must run patch 207 or later. On earlier versions, behavior remains unchanged and sessions sign in as the IAM role user. You can configure identity federation settings before you update, and they take effect after the patch update.
+ The IdP Subject must conform to Amazon Redshift database [user name limitations](https://docs.aws.amazon.com/redshift/latest/dg/r_names.html). Amazon Redshift uses the Subject as the database user name and matches it exactly, including case. The Subject can't contain a colon. We recommend a readable, unique value that doesn't change, such as an email address.
+ The client must request credentials with `GetClusterCredentialsWithIAM` for a provisioned cluster, with `GetCredentials` for Amazon Redshift Serverless, or use the appropriate SAML- or OIDC-based plugin for Amazon Redshift drivers. In Amazon Redshift query editor v2, choose **Temporary credentials using your IAM identity**.
+ To assign database roles based on IdP groups, you need an IAM Identity Center instance with users and groups provisioned from your IdP. If your cluster or workgroup has a registered IAM Identity Center application, Amazon Redshift uses that application's instance as the preferred instance. Group membership in Amazon Redshift is eventually consistent.
+ Each user's IAM Identity Center user name must exactly match their Subject.
+ If you use enhanced VPC routing, you need an IAM Identity Center interface VPC endpoint. For more information, see [Using trusted identity propagation for IAM with enhanced VPC routing](redshift-iam-access-control-tip-evr.md).

## Scope and limitations
<a name="redshift-iam-access-control-tip-considerations-scope"></a>
+ For supported AWS Regions, see [Regional availability](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_tip_federation.html#id_roles_providers_tip_federation_regional_availability) in the *IAM User Guide*.
+ Sign-ins with IAM users, database passwords, or IAM role sessions without trusted identity propagation work as before. Password sessions don't pass the user's identity to other AWS services. Password users can receive database roles based on IdP groups, except users on clusters that have an IAM Identity Center application.
+ If a cluster or namespace has an Amazon Redshift IAM Identity Center application, identity federation modes and `FEDERATION` SQL have no effect on it. For more information, see [Identity federation modes](redshift-iam-access-control-tip-identity-modes.md).
+ AWS Lambda, Amazon SageMaker AI, and Amazon Bedrock user-defined functions (UDFs) run with the function's IAM role, not with the user's identity.
+ Statements that use `IAM_ROLE 'SESSION'` or an explicit IAM role pass the user's identity to AWS Lake Formation, Amazon S3, and AWS Glue. If Amazon Redshift can't attach the identity, the statement fails rather than running without it.

## How identities map to database users
<a name="redshift-iam-access-control-tip-considerations-mapping"></a>

Each session runs as exactly one database user. Amazon Redshift chooses that database user when the session connects. It checks the conditions in the following table in order and applies the first one that matches.


| Condition | Database user | Database roles | 
| --- | --- | --- | 
| The session sets the RedshiftDbUser session tag. | The database user that the tag names. | Roles from the RedshiftDbRoles session tag. | 
| The cluster or namespace has an IAM Identity Center application. | The user's IAM Identity Center user, for example <namespace>:alice@example.com. | Roles from the application's group mapping. | 
| A database user is already linked to the user. | That database user. | Its granted roles, plus roles from IdP groups if groups are turned on. | 
| The identity federation mode is Default. | The IAM role user, for example IAMR:Analyst, if it exists. If it doesn't exist and no unbound same-named database user exists, Amazon Redshift creates and binds a database user named after the Subject. If an unbound same-named user exists, the sign-in is rejected. | No roles from IdP groups. | 
| The identity federation mode is Federate users. | A database user named after the Subject, for example alice@example.com. | Its granted roles only. | 
| The identity federation mode is Federate users and groups. | A database user named after the Subject. | Its granted roles, plus existing roles that match the user's IdP groups. | 

For more information about modes and how account, cluster, and user settings combine, see [Identity federation modes](redshift-iam-access-control-tip-identity-modes.md).

### Database user matching
<a name="redshift-iam-access-control-tip-considerations-user-matching"></a>

Amazon Redshift maps the trusted identity propagation Subject to an Amazon Redshift user by name only when federation is enabled. For more information, see [Identity federation modes](redshift-iam-access-control-tip-identity-modes.md).

### Database roles from IdP groups
<a name="redshift-iam-access-control-tip-considerations-group-roles"></a>
+ If federation with groups is enabled for an Amazon Redshift user, Amazon Redshift maps IdP-provided groups to existing Amazon Redshift roles with the same name. For more information, see [Mapping identity provider groups to Redshift roles](redshift-iam-access-control-tip-groups.md).
+ IdP groups add system roles, such as `sys:dba`, only if you explicitly allow those roles in your identity federation settings.
+ On a cluster in **Federate users and groups** mode, you can't turn off roles from IdP groups for a single user. `FEDERATION WITHOUT GROUPS` doesn't remove them.