

 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. 

# How trusted identity propagation for IAM works

This topic describes how Amazon Redshift uses an IdP user's identity from trusted identity propagation for IAM to choose the database identity, session roles, and audit identities. The examples use `alice@example.com`, who assumes the role `Analyst`. The database user for that role is `IAMR:Analyst`.

## The credential
<a name="redshift-iam-access-control-tip-how-it-works-credential"></a>

When an IdP user federates into AWS through an identity provider and assumes an IAM role, AWS STS adds the IdP user's identity to the role session credentials.

`GetClusterCredentialsWithIAM`, or `GetCredentials` for Amazon Redshift Serverless, can return `IAMTIP:<identity>`, such as `IAMTIP:alice@example.com`. Drivers pass this value to Amazon Redshift unchanged. Amazon Redshift removes the prefix before authentication, catalog lookup, and auditing. `current_user`, object ownership, and audit records contain the identity without the prefix. Create users and grant permissions using the identity without the prefix.

The credential API response doesn't include `IAMTIP:` on an earlier version or when the IAM role session sets `RedshiftDbUser`. Those cases use the IAM role user or tagged database user. Amazon Redshift can still record and propagate the associated IdP user.

## Choosing the session identity
<a name="redshift-iam-access-control-tip-how-it-works-identity"></a>

Amazon Redshift chooses one database identity when the session connects:

1. If the cluster or namespace has a registered IAM Identity Center application, the session runs as the application-namespaced user, for example `<namespace>:alice@example.com`. Identity federation modes and `FEDERATION` bindings don't apply.

1. Otherwise, a database user that is already bound to the IdP user's propagated identity is used in every mode. The binding can come from automatic user creation, `FEDERATION WITH GROUPS`, or `FEDERATION WITHOUT GROUPS`.

1. If a same-named user belongs to another identity provider, Amazon Redshift doesn't use that user for the IdP user. In every identity federation mode, the session uses the IAM role user if it exists. Otherwise, the sign-in is rejected.

1. Under **Federate users** and **Federate users and groups**, Amazon Redshift links an existing same-named user that is not yet bound to a propagated identity to the IdP user on their first sign-in. If no user exists, Amazon Redshift creates and binds one.

1. Under **Default**, an existing same-named user that is not bound to a propagated identity is not used. The session uses `IAMR:Analyst` if it exists, or the sign-in is rejected. If no same-named user and no IAM role user exist, Amazon Redshift creates and binds a user for the IdP user.


| Identity federation mode | Database user with matching name | Session runs as | 
| --- | --- | --- | 
| Any | Bound to the IdP user | alice@example.com | 
| Any | Belongs to another identity provider | IAMR:Analyst if it exists; otherwise, rejected | 
| Default | Doesn't exist | IAMR:Analyst if it exists; otherwise, alice@example.com, created and bound | 
| Default | Exists, not bound to a propagated identity | IAMR:Analyst if it exists; otherwise, rejected | 
| Federate users or Federate users and groups | Doesn't exist | alice@example.com, created and bound | 
| Federate users or Federate users and groups | Exists, not bound to a propagated identity | alice@example.com, linked to the IdP user on first sign-in | 

A Amazon Redshift user that Amazon Redshift creates has its password disabled and is set to `FEDERATION WITHOUT GROUPS`. Whether it receives group roles depends on the identity federation mode.

## Roles the session receives
<a name="redshift-iam-access-control-tip-how-it-works-roles"></a>

A session that runs as the IdP user receives direct permissions, stored role grants, and matching IAM Identity Center group roles when groups are enabled through `FEDERATION WITH GROUPS` or **Federate users and groups**. `RedshiftDbRoles` is ignored for an IdP user session.

An IAM role user fallback session receives the IAM role user's access, including `RedshiftDbRoles`, but no IAM Identity Center group roles.

## Recording both identities
<a name="redshift-iam-access-control-tip-how-it-works-audit"></a>

Amazon Redshift records both identities in the connection log. The Amazon Redshift user that the session runs as appears in the user name column. The other identity appears in the `associated_identity` column.


| Session runs as | User name | `associated_identity` | 
| --- | --- | --- | 
| IdP user | alice@example.com | IAMR:Analyst | 
| IAM role user | IAMR:Analyst | alice@example.com | 

The `associated_identity` value is for auditing only.

## Propagating identity to other services
<a name="redshift-iam-access-control-tip-how-it-works-downstream"></a>

When a `COPY`, `UNLOAD`, or external-schema query accesses another AWS service, `IAM_ROLE 'SESSION'` uses the current session's credentials. When the query specifies an explicit IAM role instead, Amazon Redshift attaches the IdP user's identity when it assumes the role. If Amazon Redshift can't attach that identity, the statement fails.

## When changes take effect
<a name="redshift-iam-access-control-tip-how-it-works-updates"></a>
+ The database identity of an open session never changes.
+ A session that received group roles when it connected can lose and regain them as membership changes are synchronized.
+ A session that received no group roles when it connected must reconnect before it can gain them.
+ Changes to account and resource settings are eventually consistent.
+ If the setting is unavailable, persistently bound users continue to sign in. Other unbound or no-user cases are rejected and can retry.