View a markdown version of this page

Identity federation modes - Amazon Redshift

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 that was published on June 30, 2025.

Identity federation modes

The identity federation mode controls how Amazon Redshift uses a user's identity from trusted identity propagation for IAM. You set the mode for your account in each AWS Region, and you can override it for a provisioned cluster or an Amazon Redshift Serverless namespace.

Console name API value Behavior
Default DEFAULT Existing IAM role users are preserved. An IdP user gets their own user only when no IAM role user or conflicting same-named user applies.
Federate users FEDERATED IdP users sign in as themselves. IdP groups aren't used.
Federate users and groups FEDERATED_WITH_GROUPS IdP users sign in as themselves, and IdP groups add matching roles.

Default

Every account starts in Default mode. Use it to get auditing and automatic user creation without changing an existing workload.

  • A connection whose IAM role already has a database user, for example IAMR:Analyst, runs as that user with the same access as before.

  • An IdP user with no database user, signing in through a role that has no database user, is created automatically as a password-disabled user named with their identity.

  • If a local user with the IdP user's name exists and isn't bound to the IdP user, and the IAM role has no database user, the sign-in is rejected. To allow the sign-in, bind the user with SQL. For more information, see Federating individual users with SQL.

  • A same-named user that belongs to another identity provider is never used for the IdP user and can't be bound. The session runs as the IAM role user if one exists; otherwise, the sign-in is rejected.

  • The connection log records both the IdP user and the IAM role.

Federate users

Use this mode when you're ready for IdP users to sign in as themselves.

  • An IdP user signs in as their own database user. If a user with the IdP user's name exists and isn't bound, Amazon Redshift links the IdP user to that user on their first sign-in. The user keeps its permissions, role memberships, and owned objects, and the IdP user continues to sign in as that user if you later return to Default.

  • If no user exists, Amazon Redshift creates one, password-disabled, and binds it to the IdP user.

  • A same-named user that belongs to another identity provider is never used for the IdP user. The session runs as the IAM role user if one exists. Otherwise, the sign-in is rejected.

  • Sessions no longer fall back to the IAM role user for IdP users who sign in through trusted identity propagation for IAM. Permissions granted only to the IAM role user, for example IAMR:Analyst, don't apply to those IdP users. Before you choose this mode, grant those permissions to the IdP users or to roles.

  • IdP groups aren't used unless an individual user is set to FEDERATION WITH GROUPS.

Federate users and groups

Use this mode when you manage access through directory groups.

  • This mode behaves like Federate users.

  • In addition, each IdP group that the IdP user belongs to adds the Amazon Redshift role with exactly the same name to the session. Roles are never created automatically. For more information, see Mapping identity provider groups to Amazon Redshift roles.

  • This mode requires an IAM Identity Center instance with your users and groups provisioned, and network access from Amazon Redshift to IAM Identity Center.

Important

In this mode, sign-ins that require group membership need Amazon Redshift to reach the default IAM Identity Center instance for your account. If IAM Identity Center returns that the user wasn't found, sign-in continues without group roles. Any other lookup error rejects the sign-in. Sign-ins that don't require groups continue. The default instance can change. For more information, see Using trusted identity propagation for IAM with enhanced VPC routing.

Password sessions continue to use the database user. On a cluster or namespace that isn't registered with an IAM Identity Center application, a password session can receive matching IdP group roles when either the user is set to FEDERATION WITH GROUPS or the effective mode is Federate users and groups. Superusers don't receive group roles in a password session. A password session doesn't carry the IdP user's identity to other AWS services. For more information, see Before you start using trusted identity propagation for IAM.

How settings combine

Amazon Redshift resolves the behavior for each sign-in from three levels:

  1. User – A user that's bound with SQL, or bound by an earlier sign-in, always signs in as the IdP user, whatever the cluster or account mode.

  2. Cluster or namespace – If the resource has its own mode, that mode applies.

  3. Account – Otherwise, the account mode applies.

Groups are on for a session when either the user is set to FEDERATION WITH GROUPS, or the effective mode for the cluster or namespace is Federate users and groups. A user setting can add groups but can't turn them off. A user set to FEDERATION WITHOUT GROUPS still receives group roles when the cluster mode is Federate users and groups.

To stop a specific IdP user from receiving group roles on a cluster in Federate users and groups, remove the matching Amazon Redshift roles or the IdP user's group memberships. There is no per-user opt-out.

The system roles list is resolved separately. The cluster or namespace list applies if the resource has one. Otherwise, the account list applies.

Users stay bound after their first sign-in

A user that Amazon Redshift creates for an IdP user, that you bind with CREATE USER ... FEDERATION or ALTER USER ... FEDERATION, or that Amazon Redshift links on first sign-in under Federate users or Federate users and groups, stays bound to that IdP user. From then on, the IdP user signs in as that database user in every mode, even if you later change the account or cluster mode back to Default. To return a bound user to the account or cluster behavior, run ALTER USER ... RESET FEDERATION.

Changes to account, cluster, and namespace settings are eventually consistent. The database user of an open session doesn't change. Reconnect when the database identity must change. Open sessions that already receive group roles pick up membership changes asynchronously. A session that received no group roles when it connected must reconnect before it can gain them.

Behavior for Amazon Redshift patch 207 and above

  • A new cluster or namespace uses the account mode unless you set its own mode when you create it.

  • In a database with no existing users or IAM role users, Amazon Redshift creates a user for each IdP user automatically on first sign-in in every mode. Default is enough to give each IdP user their own identity. Choose Federate users and groups to also use directory groups.

Choosing a mode

Your situation Recommended mode
Existing workloads on shared IAM roles, with auditing first Default
New customer, with grants to individuals Default
Moving existing users to their own identities Federate users, or bind individual users first with SQL
Access managed through directory groups Federate users and groups