

 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. 

# Troubleshooting trusted identity propagation for IAM

Use the following information to diagnose common issues with trusted identity propagation for IAM.

## How sign-in errors are reported
<a name="redshift-iam-access-control-tip-troubleshooting-errors"></a>
+ When Redshift can't safely map the IdP user to a database user, the client receives a general error such as `IAM TIP authentication failed for user "alice@example.com"`. The error doesn't reveal whether a database user exists.
+ Group-membership and Identity Store failures return a more specific category, such as `IAM TIP: could not resolve the complete Identity Center group membership for this connection`.
+ Rejected sign-ins appear as `authentication failure` rows in `SYS_CONNECTION_LOG`. For details, see [Auditing federated connections](redshift-iam-access-control-tip-audit.md).

## An IdP user can't sign in, and a database user with their name exists
<a name="redshift-iam-access-control-tip-troubleshooting-existing-user"></a>

**Cause:** The cluster or namespace uses **Default** mode. A local user with the IdP user's name exists but isn't federated, and the IAM role has no database user to use. Under Default, Redshift doesn't automatically give an IdP user an existing user's access.

**Solution:** Confirm that the cluster or workgroup runs patch 207 or later. For version requirements, see [Before you start using trusted identity propagation for IAM](redshift-iam-access-control-tip-considerations.md). Then federate the user:

```sql
ALTER USER "alice@example.com" FEDERATION WITHOUT GROUPS;
```

You can instead set the cluster, namespace, or account mode to **Federate users**. On the next sign-in, Redshift links the same-named user to the IdP user. If the same-named user belongs to another identity provider, Redshift never changes or uses that user for the IdP user. The session uses the IAM role user if one exists; otherwise the sign-in is rejected.

## An IdP user signs in as the IAM role user instead of themselves
<a name="redshift-iam-access-control-tip-troubleshooting-role-user"></a>

**Cause:** This can occur when trusted identity propagation isn't enabled on the IAM identity provider, or when the IAM role session was created without a user's identity. This is a normal IAM role user sign-in, and `associated_identity` is empty. It is also expected under **Default** when `IAMR:Analyst` exists and no user is federated to the IdP user. A cluster on an earlier version also uses the IAM role user.

If the IAM role session sets the `RedshiftDbUser` session tag, the session runs as the database user named by the tag. The connection log records the IdP user in `associated_identity` when the credentials carry that identity.

**Solution:** Grant the IdP user the required access first. Then federate or create the user with `FEDERATION WITHOUT GROUPS` or `FEDERATION WITH GROUPS`, or set the resource or account identity federation mode to **Federate users** or **Federate users and groups**. Confirm that the client calls `GetClusterCredentialsWithIAM`, or `GetCredentials` for Amazon Redshift Serverless.

## An IdP user lost access after the identity federation mode changed to Federate users
<a name="redshift-iam-access-control-tip-troubleshooting-mode-change"></a>

**Cause:** The IdP user now signs in as themselves. Permissions held only by `IAMR:Analyst`, including roles supplied through `RedshiftDbRoles`, don't apply to a session that runs as the IdP user.

**Solution:** Grant access to the IdP user or to a role granted to the IdP user. To restore the previous behavior temporarily, change the mode back to **Default** before the IdP user's first sign-in under a federated mode. Users created at sign-in, users linked to an existing same-named user on first sign-in, and users federated with SQL remain persistently bound until `RESET FEDERATION` is used.

## Group roles aren't added to the session
<a name="redshift-iam-access-control-tip-troubleshooting-groups"></a>

Check the following:

1. **Groups are turned on.** The effective mode is **Federate users and groups**, or the user was federated with `FEDERATION WITH GROUPS`. Sessions that run as the IAM role user never receive AWS IAM Identity Center group roles.

1. **The role exists with exactly the group's name.** Matching is case-sensitive. Redshift never creates roles from groups for IAM trusted identity propagation sign-ins.

1. **The role is eligible.** Roles owned by another identity provider and ordinary roles that inherit a system role aren't added from groups. A supported system role is added only when the resource's system role federation configuration allows it.

1. **The AWS IAM Identity Center user name matches.** Redshift looks up the AWS IAM Identity Center `userName` that exactly matches the IdP subject. If the user name differs, Redshift doesn't find the IdP user and the session receives no group roles.

1. Group membership synchronization is eventually consistent. A session that signed in with group roles receives membership changes after synchronization. A session that received no group roles when it connected must reconnect before it can receive them.

Run the following in the session to see its session roles:

```sql
SELECT * FROM pg_get_session_roles() AS t(rolname name, rolid integer);
```

## Sign-in fails after turning on groups
<a name="redshift-iam-access-control-tip-troubleshooting-groups-sign-in"></a>

**Cause:** Redshift can't read the IdP user's complete group membership from AWS IAM Identity Center. This often happens when enhanced VPC routing is enabled without the required interface VPC endpoints.

**Solution:** Fix the network path described in [Using trusted identity propagation for IAM with enhanced VPC routing](redshift-iam-access-control-tip-evr.md). To restore sign-in while doing that, change **Federate users and groups** to **Federate users**. For a user federated with `FEDERATION WITH GROUPS`, run:

```sql
ALTER USER "alice@example.com" FEDERATION WITHOUT GROUPS;
```

Don't use `RESET FEDERATION` merely to turn groups off. Under **Default**, a reset user uses the IAM role user if one exists and is otherwise rejected. `FEDERATION WITHOUT GROUPS` also doesn't suppress groups supplied by the **Federate users and groups** resource mode.

## Sign-in fails with an Identity Store error
<a name="redshift-iam-access-control-tip-troubleshooting-identity-store"></a>

**Cause:** The IdP user is federating through an AWS IAM Identity Center instance that is different from the preferred IAM Identity Center instance for the AWS account.

**Solution:** Configure the IAM identity provider to use the account's preferred IAM Identity Center instance. If the cluster or workgroup has a registered Amazon Redshift IAM Identity Center application, verify that the application uses the same instance. Then retry the sign-in. For more information about the preferred-instance requirement, see [Before you start using trusted identity propagation for IAM](redshift-iam-access-control-tip-considerations.md).

## A setting change didn't take effect
<a name="redshift-iam-access-control-tip-troubleshooting-setting-delay"></a>

**Cause:** You made an account, cluster, or namespace identity configuration change, but it isn't reflected in database behavior.

**Solution:** Identity federation settings are eventually consistent.

## Sign-in fails after an AWSIDC identity provider is disabled
<a name="redshift-iam-access-control-tip-troubleshooting-provider-disabled"></a>

**Cause:** A registered AWS IAM Identity Center provider controls IAM TIP token sign-ins on that resource. Disabling the provider rejects those sign-ins. The account and resource federation modes don't bypass it.

**Solution:** Re-enable the provider, or remove the registered integration only after planning how users, grants, ownership, and future sign-ins will be handled.

## A statement that uses an explicit IAM role fails
<a name="redshift-iam-access-control-tip-troubleshooting-explicit-role"></a>

**Cause:** Redshift can't attach the user's identity when it assumes the explicit IAM role. The statement fails rather than running without that identity.

**Solution:** Make sure that the IAM role trusts `redshift.amazonaws.com` and that Redshift can reach AWS STS. If enhanced VPC routing is enabled, configure an AWS STS interface VPC endpoint. `IAM_ROLE 'SESSION'` uses the session's credentials directly.

## Related topics
<a name="redshift-iam-access-control-tip-troubleshooting-related"></a>
+ [How trusted identity propagation for IAM works](redshift-iam-access-control-tip-how-it-works.md)
+ [Auditing federated connections](redshift-iam-access-control-tip-audit.md)
+ [Using trusted identity propagation for IAM with enhanced VPC routing](redshift-iam-access-control-tip-evr.md)
+ [Federating individual users with SQL](redshift-iam-access-control-tip-federate-users.md)