

# Get started with simplified trusted identity propagation

## Before you begin
<a name="emr-serverless-tip-simplified-before-you-begin"></a>

Enable at least one downstream service that authorizes on identity, such as AWS Lake Formation, Amazon S3 Access Grants, or S3 table grants. The downstream service is what enforces the propagated identity.

## Choose a path
<a name="emr-serverless-tip-simplified-choose-path"></a>

Choose the IAM Identity Center path, the IAM federation path, or both. The two paths can coexist in the same account.

IAM Identity Center path  
An administrator opts in once in the IAM Identity Center console. Choose **Settings**, choose the **Identity source** tab, and in the **Simplified trusted identity propagation** section choose **Enable**. The setting applies to the whole IAM Identity Center instance, so it affects every application on the instance, including Amazon SageMaker Unified Studio domains. For more information, see [Enable the simplified experience](https://docs.aws.amazon.com/singlesignon/latest/userguide/simplified-tip-enabling.html) in the *IAM Identity Center User Guide*. An instance stays on the earlier version until you opt in, and an instance cannot run both versions at once. Users and groups from your external identity provider keep synchronizing. With the earlier version, Amazon EMR Serverless created the Identity Center application for you when you created your first IAM Identity Center-enabled application. With the simplified version, no Identity Center application is used, and there is no further configuration in Amazon EMR Serverless beyond the setup that follows.

IAM federation path  
An administrator registers the identity provider in IAM, if it is not already registered, and configures a context provider. A context provider is the IAM configuration that defines which attributes, such as user ID, email, and department, AWS Security Token Service records from the federated token. For more information, see [Configure a context provider for trusted identity propagation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_tip.html) in the *IAM User Guide*. No IAM Identity Center instance is required.  
Each downstream service decides how it evaluates role-based and identity-based grants. By default, authorization is based on user attributes. To authorize on groups and to enable revocation checking, attach an IAM Identity Center instance to your IAM identity provider. Users still sign in through IAM federation.

## Set up Amazon EMR Serverless
<a name="emr-serverless-tip-simplified-setup"></a>

The job execution role trusts the Amazon EMR Serverless service principal (`emr-serverless.amazonaws.com`) for `sts:AssumeRole`. This is the standard trust relationship for an Amazon EMR Serverless job runtime role, so an execution role that you already use needs no trust policy change. For the trust policy, see [Create a job runtime role](getting-started.md#gs-runtime-role).

You do not add the `sts:SetContext` permission that the earlier version required. On releases 7.8.0 and higher, identity propagation is always enabled. Create an application and submit a job or session as usual.

**Note**  
The `IdentityCenterConfiguration` parameter on `CreateApplication` is not used with the simplified version. Your existing fine-grained access control setup carries over unchanged.

## Run workloads
<a name="emr-serverless-tip-simplified-run-workloads"></a>

After setup, create sessions and submit jobs as usual. A job runs on behalf of the user who submits it. Amazon EMR Serverless propagates that user's identity to the downstream services you enabled.

## Background sessions and identity lifetime
<a name="emr-serverless-tip-simplified-sessions-lifetime"></a>

Amazon EMR Serverless can keep a job attributable to the user after sign-out by using an IAM Identity Center background session. Background sessions are controlled at the IAM Identity Center instance level, not through an Amazon EMR Serverless setting. Amazon EMR Serverless requests a background session when work starts, or reuses one that an upstream application such as Amazon SageMaker Unified Studio created. A new instance has background sessions enabled by default, and a migrated instance keeps its previous setting. If background sessions are disabled, Amazon EMR Serverless falls back to an interactive session, and the workload keeps the identity only as long as the interactive sign-in session lasts.

The maximum identity lifetime is 90 days on the IAM Identity Center path. On the IAM federation path, the maximum is 90 days with an attached IAM Identity Center instance, and up to 7 days without one. A workload that runs longer than the maximum, such as a Spark structured streaming job, fails when the maximum is reached rather than continuing without an identity.