

# Securing your Resources on Amazon EMR

Amazon EMR Migration Guide offers a comprehensive set of controls to secure data processing in AWS. This chapter covers six security domains: authentication (verifying identity), authorization (granting access to resources), encryption, network security, auditing (tracking who accessed what and when), and patching. It concludes with best practices and reference architectures for common customer scenarios.

## EMR security configuration
<a name="emr-security-configuration"></a>

To configure many of these controls, you create Amazon EMR security configurations. You specify which control to enable and how to configure it, and then you specify the security configuration when you launch a cluster. Amazon EMR configures the applications and components for you. You can configure the following with a security configuration:
+ Data encryption, both in-transit and at-rest.
+ Authentication, through Kerberos and LDAP integration.
+ Authorization, through Lake Formation and S3 Access Grants.

For more information, see [Use security configurations to set up Amazon EMR cluster security](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-security-configurations.html).

## Authentication
<a name="authentication"></a>

Authentication verifies the identity of a user, application, or service before it grants access. In Amazon EMR, authentication operates at two levels.
+ **Cluster administration with EMR APIs** – verifying the identities that create clusters, modify configurations, and terminate clusters through the Amazon EMR public APIs.
+ **Application and job authentication** – verifying the users, applications, and services that interact with the open-source frameworks, such as submitting Spark or Hive queries, accessing HDFS, or connecting to HiveServer2. Kerberos, LDAP, or other mechanisms handle this level.

### Cluster administration with EMR APIs
<a name="cluster-administration-emr-apis"></a>

AWS Identity and Access Management (IAM) controls access to the Amazon EMR web service APIs, such as the APIs that create and terminate clusters. Administrators or automated pipelines typically perform these actions. The IAM policies that you attach to users, groups, or roles determine which Amazon EMR API actions a principal can perform, and on which resources. This applies whether the principal uses the console, the AWS CLI, or an SDK.

For more information, see [AWS Identity and Access Management for Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-access-iam.html) in the Amazon EMR Management Guide.

### Application and job authentication
<a name="application-job-authentication"></a>

In Amazon EMR on EC2, you can configure multiple authentication mechanisms. These mechanisms are mutually exclusive.
+ **IAM authentication** – the Amazon EMR APIs `AddJobFlowSteps` and `GetClusterSessionCredentials`.
+ **Kerberos** – clients such as `spark-submit` and `beeline`.
+ **Native LDAP** – applications such as Hue and Zeppelin.

#### IAM authentication
<a name="iam-authentication"></a>

IAM users or roles submit jobs using Amazon EMR Steps. By default, these jobs access AWS services using the cluster's EC2 instance profile role. Amazon EMR provides two cloud-native mechanisms that authenticate jobs without sharing the instance profile:
+ **Runtime Roles for EMR Steps** – assign a dedicated IAM role per step for per-job least-privilege access.
+ **`GetClusterSessionCredentials` API** — issue temporary, role-scoped credentials to external clients, such as Amazon SageMaker Unified Studio, Amazon EMR Studio, or Amazon SageMaker AI Studio notebooks.

For a deep dive, see [Authorization](#authorization).

#### Kerberos authentication
<a name="kerberos-authentication"></a>

Kerberos is the standard authentication protocol for the Hadoop ecosystem. Users and services authenticate with a Key Distribution Center (KDC) and receive tickets. Kerberos provides mutual authentication.

You can choose from three Kerberos architecture options:
+ **Cluster-dedicated KDC** – Amazon EMR runs a KDC on the primary node. This option is the simplest and requires no extra infrastructure.
+ **Cross-realm trust** – the cluster-dedicated KDC establishes a one-way trust with an external realm, such as an Active Directory domain. Users authenticate with their Active Directory credentials.
+ **External KDC** – the cluster uses an existing external KDC, such as an MIT KDC. Multiple clusters can share it.

Most applications support Kerberos. For more information, see [Supported applications](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos-principals.html) and [Kerberos architecture options](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos-options.html) in the Amazon EMR Management Guide, and [Appendix B: EMR Kerberos Workflow](appendix-b-kerberos.md).

#### EMR native LDAP integration (Amazon EMR 6.12.0 and later)
<a name="emr-native-ldap-integration"></a>

Amazon EMR provides native integration with LDAP-compatible identity servers, such as Active Directory and OpenLDAP. When you enable this integration in the Amazon EMR security configuration, Amazon EMR configures supported applications to authenticate users against your LDAP server over LDAPS, sets up and maintains a Kerberos KDC on the cluster, and maps LDAP users to Kerberos principals. The integration also provides fine-grained SSH access control, so that only LDAP-authenticated users can connect through SSH, and it creates OS-level accounts and maps groups automatically.

We recommend this approach for LDAP-based authentication. It replaces the manual Kerberos cross-realm trust setup.

For more information, see [Use Active Directory or LDAP servers for authentication with Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/ldap.html) in the Amazon EMR Management Guide, and the AWS Big Data Blog post [Simplify authentication with native LDAP integration on Amazon EMR](https://aws.amazon.com/blogs/big-data/simplify-authentication-with-native-ldap-integration-on-amazon-emr/).

## Authorization
<a name="authorization"></a>

Authorization allows or denies an identity permission to perform an action. Authorization requires an authenticated identity. Amazon EMR groups authorization mechanisms into two categories: EMR-native authorization and open source authorization.

### EMR-native authorization
<a name="emr-native-authorization"></a>

#### Default authorization when accessing AWS services from an EMR cluster
<a name="default-authorization-aws-services"></a>

Default authorization is based on the cluster's assigned IAM role, which is the instance profile. The instance profile's IAM policies govern all actions within the cluster. These policies govern access to Amazon S3 buckets and prefixes, AWS Glue Data Catalog databases and tables, Kinesis Data Streams, DynamoDB tables, Amazon MSK topics, and any other service that IAM can control. For more information, see [Service role for cluster EC2 instances (EC2 instance profile)](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-role-for-ec2.html).

A straightforward approach is to segregate users and workloads onto dedicated clusters, and to assign each cluster a specific instance profile with least-privilege IAM policies. This approach is simple, but it increases operational overhead and cost. It is best for a small number of distinct access patterns.

#### EMR Steps with EMR default authorization
<a name="emr-steps-default-authorization"></a>

You can submit Spark and Hive jobs with `spark-submit` or `beeline`, but we recommend that you use Amazon EMR Steps through AWS APIs. Steps are managed, auditable, and integrated with IAM. For more information, see [Submit work to an Amazon EMR cluster](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-work-with-steps.html). Restrict IAM principals so that they can submit EMR steps only to designated clusters.

#### EMR runtime roles
<a name="emr-runtime-roles"></a>

You can specify a dedicated IAM role when you submit a Spark or Hive job. The job assumes the runtime role and uses its IAM policies instead of the shared instance profile. Runtime roles enable multi-tenant clusters with per-job permission isolation.

You can specify a runtime role when you do the following:
+ Submit EMR Steps (Spark or Hive batch, or Spark Structured Streaming).
+ Submit Spark through Apache Livy.
+ Launch interactive Spark sessions through Amazon EMR Studio, Amazon SageMaker AI Studio, or Amazon SageMaker Unified Studio.

The submitter must be an IAM principal with permission to submit with the specified runtime role. Runtime roles eliminate the need for separate clusters per user or team.

For more information, see the following:
+ [Runtime roles for Amazon EMR steps](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-steps-runtime-roles.html)
+ [Run an EMR Studio Workspace with a runtime role](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-studio-runtime.html)
+ [Configure IAM runtime roles for Amazon EMR cluster access in Studio](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-emr-cluster-rbac.html)
+ [Adding an existing Amazon EMR on EC2 cluster in Amazon SageMaker Unified Studio](https://docs.aws.amazon.com/sagemaker-unified-studio/latest/userguide/adding-existing-emr-on-ec2-clusters.html)

#### EMR runtime roles with Lake Formation integration
<a name="emr-runtime-roles-lake-formation"></a>

On clusters that are configured with runtime roles, you can enable AWS Lake Formation-based access control for Spark access to AWS Glue Data Catalog resources. Lake Formation provides centralized access control on tables that are registered in the AWS Glue Data Catalog with data in Amazon S3, with fine-grained controls at the database, table, column, row, and cell levels. Multiple engines integrate with Lake Formation, including Amazon EMR on EC2, Amazon EMR Serverless, and Amazon Athena, and you don't manage IAM or Amazon S3 resource policies. For more information, see [AWS Lake Formation: How it works](https://docs.aws.amazon.com/lake-formation/latest/dg/how-it-works.html).

There are two integration types:
+ **Full Table Access** – tables are shared in their entirety, with no column or row filters. This type has minimal performance overhead and requires Amazon EMR 7.8.0 or higher. For more information, see [Lake Formation full table access for Amazon EMR on EC2](https://docs.aws.amazon.com/emr/latest/ManagementGuide/lake-formation-unfiltered-ec2-access.html).
+ **Fine-Grained Access** – you share a subset of columns or apply row-level filters. This type splits the Spark application into a user space that runs under the runtime role and a system space that runs under a privileged identity, which filters data so that unauthorized data never reaches user code. Use Amazon EMR 7.10 or higher for the enhanced integration. For more information, see [Fine-grained access with Lake Formation](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-lf-enable.html). The [Using EMR Serverless with AWS Lake Formation for fine-grained access control](https://docs.aws.amazon.com/emr/latest/EMR-Serverless-UserGuide/emr-serverless-lf-enable.html) documentation also applies.

#### EMR runtime roles with S3 Access Grants integration
<a name="emr-runtime-roles-s3-access-grants"></a>

On clusters that use runtime roles, you can use Amazon S3 Access Grants for scalable, identity-based access control to Amazon S3 data, with Amazon EMR 6.15.0 or higher. S3 Access Grants grants permissions at the bucket, prefix, or object level. Amazon EMR obtains temporary, scoped-down AWS STS credentials for each request, and you don't manage IAM or Amazon S3 resource policies.

You can enable both S3 Access Grants and Lake Formation together. Use Lake Formation for tabular data and S3 Access Grants for unstructured or direct Amazon S3 access. For more information, see [Using Amazon S3 Access Grants with Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-access-grants.html).

#### Apache Ranger authorization
<a name="apache-ranger-authorization"></a>

Apache Ranger provides centralized, fine-grained authorization across frameworks. Amazon EMR supported native Ranger integration up to and including Amazon EMR 7.3, for Trino, Hive, Spark, and EMRFS. For Amazon EMR 7.4 and later, native Ranger integration is no longer supported.

Customers who come from Ranger have two options:
+ Migrate Ranger policies to Lake Formation. For more information, see [Phase 2: Configure AWS Lake Formation](#tip-phase-2-lake-formation).
+ (Recommended) Use AWS partner solutions, such as Privacera, a unified data governance platform with Ranger-compatible policy management. For more information, see [Access Management for EMR cluster](https://docs.privacera.com/connectors/aws-emr/access/index.html) in the Privacera documentation.

### Open source authorization mechanisms for other frameworks
<a name="open-source-authorization-mechanisms"></a>

Several frameworks provide their own application-layer authorization mechanisms.
+ **Trino** – file-based access control. You define rules in manually configured JSON files on the cluster. These rules control which users can access which catalogs and schemas, read and write access at the table level, row-level filtering, and column masking. For more information, see [File-based access control](https://trino.io/docs/current/security/file-system-access-control.html) in the Trino documentation.
+ **Hive** – SQL standard-based authorization. You use `GRANT` and `REVOKE` statements to manage database-level and table-level privileges, such as `SELECT`, `INSERT`, `UPDATE`, and `DELETE`. This mechanism supports role-based access control and is enforced at HiveServer2. For more information, see [SQL Standard Based Hive Authorization](https://cwiki.apache.org/confluence/spaces/Hive/pages/40509928/SQL+Standard+Based+Hive+Authorization) in the Apache Hive wiki.
+ **HBase** – HBase ACLs. These provide cell-level authorization for namespaces, tables, column families, and cells. Permissions are Read (R), Write (W), Execute (X), Create (C), and Admin (A). For more information, see [Access Control Labels (ACLs)](https://hbase.apache.org/book.html#hbase.accesscontrol.configuration) in the HBase documentation.

**Note**  
Regardless of which open source mechanism you configure, the Amazon EMR EC2 instance profile role must have IAM permissions that cover the superset of all access that the framework needs. Open source controls filter at the application layer, but the underlying calls to Amazon S3 and the AWS Glue Data Catalog use the instance profile role's credentials. If the IAM role lacks a permission, the request fails before framework-level authorization is evaluated.

### Amazon Athena as an alternative for interactive SQL workloads
<a name="athena-alternative-interactive-sql"></a>

Amazon Athena is a serverless, interactive SQL query service. You can migrate interactive SQL workloads that run on Trino, Presto, Hive, or Impala to Athena. Athena natively integrates with Lake Formation for fine-grained access control at the column, row, and cell levels, eliminates cluster management, and offers pay-per-query pricing. Trino and Presto migrations need minimal query adjustment. Hive and Impala migrations might need more syntax adaptation. For more information, see the [Amazon Athena documentation](https://docs.aws.amazon.com/athena/latest/ug/what-is.html).

## Migrating to EMR Trusted Identity Propagation
<a name="migrating-emr-trusted-identity-propagation"></a>

This section describes the migration path from Cloudera KnoxSSO and Cloudera Identity Federation to Amazon EMR Trusted Identity Propagation. Cloudera KnoxSSO is a gateway-based single sign-on (SSO) proxy that brokers authentication to Hadoop services. AWS IAM Identity Center with Trusted Identity Propagation replaces it. Instead of a gateway proxy, Identity Center propagates corporate identities across AWS analytics services through OAuth tokens.

AWS IAM Identity Center is the centralized identity service that manages workforce users and groups. Trusted Identity Propagation propagates a user's Identity Center-authenticated identity from the entry-point application, such as Amazon EMR Studio, through to downstream services, such as Lake Formation and S3 Access Grants, for fine-grained, user-level authorization.

### Phase 1: Set up AWS IAM Identity Center
<a name="tip-phase-1-identity-center"></a>

AWS IAM Identity Center replaces the KnoxSSO provider configuration and the Cloudera User Management Service. For more information, see [Integrate Amazon EMR with AWS IAM Identity Center](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-idc.html).

1. Enable IAM Identity Center in your Region.

1. Connect your existing identity provider, such as Okta, Microsoft Entra ID or Active Directory, or Ping Identity. Use the same identity provider that you federate through KnoxSSO.

1. Sync users and groups through SCIM provisioning.

1. Verify SSO login through the AWS access portal.

For more information, see [IAM Identity Center identity source tutorials](https://docs.aws.amazon.com/singlesignon/latest/userguide/tutorials.html).

### Phase 2: Configure AWS Lake Formation
<a name="tip-phase-2-lake-formation"></a>

AWS Lake Formation replaces Ranger or Sentry authorization. Ranger group policies map to Lake Formation grants for Identity Center users and groups. Knox topology-based data access maps to Amazon S3 Access Grants with Lake Formation.

1. Disable legacy IAM-only access control. Clear **Use only IAM access control**.

1. Integrate Lake Formation with IAM Identity Center. Choose **Create**.

1. Enable external engine filtering to allow external engines to filter data in registered Amazon S3 locations. Set `AuthorizedSessionTagValue` to `Amazon EMR`.

1. Register Amazon S3 data locations with a custom IAM role, not the service-linked role. The role's permission policy must grant `s3:PutObject`, `s3:GetObject`, and `s3:DeleteObject` on the paths, and `s3:ListBucket` on the bucket. The role's trust relationship must allow `lakeformation.amazonaws.com` to call both `sts:AssumeRole` and `sts:SetContext`. The `sts:SetContext` action enables trusted identity propagation and is not in the default service-linked role.

1. Create AWS Glue Data Catalog databases and tables that point to your migrated Amazon S3 data.

1. Grant permissions to Identity Center users and groups at the row, column, or cell level.

For more information, see [Setting up AWS Lake Formation with IAM Identity Center](https://docs.aws.amazon.com/singlesignon/latest/userguide/tip-tutorial-lf.html) and [Prerequisites for Trusted Identity Propagation with EMR on EC2](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-trusted-identity-prerequisites.html).

### Phase 3: Set up EMR security configuration
<a name="tip-phase-3-emr-security-configuration"></a>

The Amazon EMR security configuration with Identity Center replaces the KnoxSSO gateway topology files. Amazon EMR in-transit encryption certificates replace the Knox mutual TLS and SSL certificates. Amazon EMR-managed Kerberos replaces the manual KDC setup.

1. Create TLS certificates for in-transit encryption. Use 2048-bit RSA certificates. For production, use AWS Private Certificate Authority or your internal certificate authority. Use self-signed certificates only for development and testing.

1. Upload the certificates to an Amazon S3 location that the Amazon EMR service role can access.

1. Create an Amazon EMR security configuration with IAM Identity Center integration enabled. This configuration auto-configures Kerberos. For more information, see [Configure Trusted Identity Propagation with EMR on EC2](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-trusted-identity.html). A CloudFormation template, `emr-tip.yaml`, automates much of the setup.

### Phase 4: Configure EMR roles and launch the cluster
<a name="tip-phase-4-emr-roles-launch"></a>

1. Create and configure IAM roles: the Amazon EMR service role, the EC2 instance profile role, and a Lake Formation access role with an `sts:AssumeRole` trust relationship.

1. Launch an Amazon EMR cluster with the Identity Center-enabled security configuration and Lake Formation integration. Use release 6.15.0 or higher for EC2, or 7.8.0 or higher for Serverless.

1. Verify that the cluster reaches the Waiting state without certificate or Kerberos errors.

Amazon EMR manages the credential relay, so your Identity Center identity propagates to Spark, Hive, and Presto or Trino sessions.

### Phase 5: Set up SageMaker Unified Studio (or EMR Studio)
<a name="tip-phase-5-sagemaker-unified-studio"></a>

Amazon SageMaker Unified Studio is the strategic recommended IDE for new Amazon EMR migrations and the primary focus of AWS's data and analytics IDE investment. It replaces the Knox-proxied Hue and the Cloudera Manager UI. It provides interactive Spark, SQL analytics, and ML with built-in Trusted Identity Propagation across Amazon EMR on EC2, Amazon EMR Serverless, Amazon Athena, and Amazon Redshift. Amazon EMR Studio remains an alternative.

1. Create a SageMaker Unified Studio project with Amazon EMR compute (recommended). If your use case requires the advisory capabilities that follow, create an Amazon EMR Studio workspace with IAM Identity Center integration instead.

1. Assign users and groups from Identity Center.

1. Have users log in with their corporate credentials. Their identity propagates to queries.

For more information, see [Bring your workforce identity to Amazon EMR Studio and Athena](https://aws.amazon.com/blogs/big-data/bring-your-workforce-identity-to-amazon-emr-studio-and-athena/).

**Important**  
Amazon SageMaker Unified Studio is the strategic recommended IDE. Amazon EMR Studio is supported, but it is not the focus of new feature development, and upcoming capabilities land in Amazon SageMaker Unified Studio first.  
Amazon EMR Studio might be appropriate when one of the following is true:  
You require AWS Service Catalog cluster templates for governed provisioning.
You need Git-native repository integration within the notebook.
You require parameterized, headless notebook execution through the Amazon EMR API.
You have an existing Amazon EMR Studio deployment and prefer a phased transition.
Real-time multi-user notebook collaboration in Amazon EMR Studio Workspaces is not supported when Trusted Identity Propagation is enabled. If your migration uses Trusted Identity Propagation (recommended), collaboration is not an Amazon EMR Studio advantage. Both Amazon SageMaker Unified Studio and Amazon EMR Studio support Trusted Identity Propagation.

### Phase 6 (optional): S3 Access Grants for raw file access
<a name="tip-phase-6-s3-access-grants"></a>

If you need prefix-level Amazon S3 authorization, similar to Ranger Amazon S3 policies, set up Amazon S3 Access Grants. For more information, see [Simplify data lake access control with Trusted Identity Propagation](https://aws.amazon.com/blogs/big-data/simplify-data-lake-access-control-for-your-enterprise-users-with-trusted-identity-propagation-in-aws-iam-identity-center-aws-lake-formation-and-amazon-s3-access-grants/).

1. Create an Amazon S3 Access Grants instance.

1. Register an IAM Identity Center association.

1. Define grants that map Identity Center groups to Amazon S3 prefixes, for read or write access.

### Key differences from Cloudera KnoxSSO
<a name="tip-key-differences-knoxsso"></a>
+ No gateway proxy is needed. Identity flows natively through OAuth token exchange.
+ No topology files. Lake Formation and the security configuration handle routing.
+ Kerberos is auto-managed. Amazon EMR configures it internally.
+ Auditing is built in. AWS CloudTrail captures the propagated Identity Center user ID end-to-end.

## Encryption
<a name="encryption"></a>

Amazon EMR Migration Guide supports encryption for data in transit and data at rest. Encryption covers data in Amazon S3 storage, local instance storage, and Amazon EBS volumes, including root device volumes. You configure encryption through Amazon EMR security configurations.

![Diagram showing the available encryption options for data at rest and in transit.](https://docs.aws.amazon.com/whitepapers/latest/amazon-emr-migration-guide/images/figure10.png)


**Figure 10: Encryption options**

For an up-to-date list, see [Encryption options](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-data-encryption-options.html).

### Encryption for data in-transit
<a name="encryption-in-transit"></a>

When you enable in-transit encryption, Amazon EMR configures the open-source applications to encrypt data as it moves between nodes, between applications, and between clients and the cluster. The mechanisms are application-specific and vary by release. You can override the defaults through [Configure applications](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html).

In-transit encryption uses three categories of mechanisms:
+ **TLS** – protects web UIs, HTTPS endpoints, and many client-facing ports, such as the Spark UI, the HDFS NameNode HTTPS endpoint, HiveServer2, and the Presto or Trino coordinator and worker.
+ **SASL with Kerberos** – protects Hadoop RPC endpoints, such as the YARN ResourceManager, the HDFS NameNode RPC endpoint, and HBase RPC. These endpoints require Kerberos enabled alongside in-transit encryption.
+ **Application-specific encryption** – for example, Spark uses AES-based encryption for RPC between drivers, executors, and the shuffle service.

For the broadest coverage, enable both in-transit encryption and Kerberos. With Runtime Roles, Kerberos is auto-configured. If you enable only in-transit encryption, Amazon EMR protects TLS-capable endpoints but leaves SASL endpoints unencrypted. For more information, see the in-transit encryption support matrix in the [Amazon EMR Management Guide](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-data-encryption-options.html#emr-encryption-intransit).

You can supply TLS certificates in three ways:
+ **Amazon S3 zip archive** – you bundle PEM certificates, which are a private key, a certificate chain, and an optional trusted-certificates file, in a zip that you upload to Amazon S3. Amazon EMR distributes them to every node. Certificates should use a wildcard common name that matches the VPC domain, for example `CN=*.ec2.internal` for us-east-1 or `CN=*.us-west-2.compute.internal` for us-west-2. If the certificate lacks a wildcard CN, the default hostname verifier rejects TLS connections. In that case, set `hadoop.ssl.hostname.verifier` to `ALLOW_ALL` through the `core-site` classification, on Amazon EMR 7.3.0 and later. For more information, see [Providing certificates for encrypting data in transit](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-encryption-enable.html).
+ **Custom certificate provider** – you implement a Java class that extends `TLSArtifactsProvider` and overrides `getTlsArtifacts()`. You package the class as a JAR, upload it to Amazon S3, and reference the Amazon S3 path and the class name in the security configuration. The provider can retrieve certificates at startup from AWS Secrets Manager or an internal certificate authority. Compile the JAR against the AWS SDK version that matches your target Amazon EMR release. For more information, see [Store Amazon EMR in-transit data encryption certificates using AWS Secrets Manager](https://aws.amazon.com/blogs/big-data/store-amazon-emr-in-transit-data-encryption-certificates-using-aws-secrets-manager/) on the AWS Big Data Blog.
+ **EMR-generated certificates** – Amazon EMR generates and distributes TLS certificates and stores them in AWS Secrets Manager. This option is the simplest when you do not bring your own certificate authority.

For production, use CA-issued certificates. Some frameworks enforce TLS hostname verification, so certificates must include valid hostnames or SANs.

### AWS Nitro System encryption
<a name="nitro-system-encryption"></a>

On EC2 instance types that are based on the AWS Nitro System, traffic between instances is automatically encrypted at the hardware level by the Nitro networking card using AES-256-GCM. This encryption is transparent, requires no configuration or certificates, and adds no measurable overhead. It applies within the same VPC or across peered VPCs in the same Region. Nitro operates at the network layer (layer 3) and does not replace Amazon EMR in-transit encryption (layer 7). For more information, see [Enforce VPC encryption in transit](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-encryption-in-transit.html) in the Amazon VPC User Guide.

### Encryption for data at rest
<a name="encryption-at-rest"></a>

Encryption for data at rest covers three storage layers: data in Amazon S3, data in the Amazon EMR WAL (HBase on Amazon S3), and local disks (instance store and Amazon EBS volumes). You configure all three through an Amazon EMR security configuration.

#### Data in Amazon S3
<a name="encryption-at-rest-s3"></a>

Amazon EMR integrates with Amazon S3 encryption for all objects that it reads and writes, and it supports per-bucket encryption overrides. Data in transit is always protected, because TLS is enforced for data between cluster nodes and Amazon S3. Amazon EMR supports two modes, Server-Side Encryption (SSE) and Client-Side Encryption (CSE), which determine where encryption and decryption occur and who controls the keys.

With Server-Side Encryption, Amazon S3 performs encryption service-side:
+ **SSE-S3** – Amazon S3 manages the keys using AES-256 (AES-GCM). This mode needs no key management infrastructure. It is the default for new Amazon S3 buckets, so if no encryption is specified in the Amazon EMR security configuration, objects use this default.
+ **SSE-KMS** – Amazon S3 uses a customer-managed AWS KMS key. This mode provides key usage audit through AWS CloudTrail, fine-grained access through AWS KMS key policies, and automatic key rotation.

**Note**  
The AWS KMS key policy must explicitly grant permissions to the Amazon EMR instance profile role or runtime role, or operations fail with `AccessDeniedException`.

With Client-Side Encryption, encryption and decryption happen within the cluster before and after Amazon S3, and Amazon S3 stores only ciphertext:
+ **CSE-KMS** – the cluster uses AWS KMS to generate and manage data keys. Each object has a unique data key that is encrypted under the AWS KMS key.
+ **CSE-Custom** – you supply a custom Java class that implements `EncryptionMaterialsProvider` for the root key.

For more information, see [Amazon S3 client-side encryption](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-data-encryption-options.html#emr-encryption-cse) in the Amazon EMR Management Guide.

**Note**  
CSE-Custom encrypted objects are not natively readable by services that do not use the Amazon EMR Amazon S3 client. Amazon Athena and Amazon Redshift Spectrum cannot decrypt CSE-C objects.

#### Root volume
<a name="encryption-at-rest-root-volume"></a>

Beginning with Amazon EMR 5.24.0, you can encrypt the Amazon EBS root volume through the security configuration when AWS KMS is the key provider. For versions prior to 5.24.0, use a custom AMI. For more information, see [Creating a custom AMI with an encrypted Amazon EBS root device volume](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html#emr-custom-ami-encrypted-root).

#### EBS volumes
<a name="encryption-at-rest-ebs-volumes"></a>

For non-root volumes, which hold HDFS and application data, there are two mechanisms: EBS encryption (cloud-native) and LUKS encryption (OS-managed). For more information, see [At-rest encryption for local disks](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-data-encryption-options.html#emr-encryption-localdisk).

For Amazon EMR 5.24.0 and later, you can natively encrypt Amazon EBS volumes through the security configuration. Native encryption provides the following benefits:
+ Native end-to-end encryption, so intermediate data and I/O between EC2 and Amazon EBS are encrypted.
+ Root volumes are encrypted without custom AMIs.
+ Encryption is transparent to applications.
+ Status checks are simplified, through the EC2 console Volumes page or the EC2 API.

## Network security
<a name="network-security"></a>

For foundational VPC, subnet, security group, and NACL setup, see [Configure networking in a VPC for Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-clusters-in-a-vpc.html) and [Control network traffic with security groups](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-security-groups.html) in the Amazon EMR Management Guide.

### Best practices for network security
<a name="network-security-best-practices"></a>
+ **Use private subnets for production clusters.** Add a gateway VPC endpoint for Amazon S3 and interface endpoints for AWS KMS, Amazon CloudWatch, and AWS STS. For more information, see [Amazon VPC options](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-vpc-host-job-flows.html).
+ **Use a NAT gateway for outbound internet access from private subnets.** For more information, see [VPC with public and private subnets (NAT)](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Scenario2.html).
+ **Use a proxy server when NAT or internet gateways are not permitted.** Provide the following configuration:

  ```
  AWS_REGION="YOUR_AWS_REGION"      # replace with your cluster region
  PROXY_HOST="YOUR_PROXY_HOSTNAME" # replace with your proxy's hostname or ip
  
  http_proxy="http://${PROXY_HOST}/"
  https_proxy="https://${PROXY_HOST}/"
  no_proxy="127.0.0.1,localhost,169.254.169.254,*.s3.${AWS_REGION}.amazonaws.com,.s3.${AWS_REGION}.amazonaws.com,s3.${AWS_REGION}.amazonaws.com,*.s3.amazonaws.com,.s3.amazonaws.com,s3.amazonaws.com,.s3.dualstack.${AWS_REGION}.amazonaws.com,.amazonaws.com"
  
  echo "http_proxy=$http_proxy" >> /etc/environment
  echo "https_proxy=$https_proxy" >> /etc/environment
  echo "no_proxy=$no_proxy" >> /etc/environment
  
  echo "export http_proxy=$http_proxy" >> /etc/profile.d/http_proxy.sh
  echo "export https_proxy=$https_proxy" >> /etc/profile.d/http_proxy.sh
  echo "export no_proxy=$no_proxy" >> /etc/profile.d/http_proxy.sh
  ```

  For the NO\_PROXY variable, note these best practices:
  + Include both the wildcard (\*.domain.com) and leading-dot (.domain.com) formats, because tools interpret them differently.
  + 169.254.169.254 must be in no\_proxy to prevent IMDS and IAM role credential requests from being routed through the corporate proxy.
  + Add regional Amazon S3 domains to no\_proxy to keep Amazon S3 traffic off the corporate proxy, which can throttle throughput. Adjust this if you use Amazon S3 VPC endpoints.
  + For HTTPS proxies, import correct TLS certificates on the Amazon EMR nodes.
  + Add all AWS services that are reachable through VPC endpoints to no\_proxy.
+ **Apply restrictive policies to Amazon S3 VPC endpoints.** Limit access to only the buckets the cluster requires, such as input, output, Amazon EMR logs, and Amazon EMR system artifacts. For more information, see [Sample policies for private subnets that access Amazon S3](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-clusters-in-a-vpc.html#emr-private-subnet-iam).
+ **Eliminate SSH access for non-interactive clusters.** Do not open port 22. Use AWS Systems Manager Session Manager for shell access without open inbound ports, bastion hosts, or SSH keys. Session Manager logs session activity to Amazon CloudWatch Logs or Amazon S3.
+ **Enable block public access.** Block public access (BPA) prevents cluster creation when a security group has an inbound rule that allows 0.0.0.0/0 or ::/0 on a non-exception port. BPA is enabled by default in every Region and applies across the cluster lifecycle. Port 22 is an exception by default. Keep BPA enabled. For more information, see [Using Amazon EMR block public access](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-block-public-access.html).

## Auditing
<a name="auditing"></a>

Auditing is about understanding who accessed your cluster, what data was read and written, and which API calls were made.

### Amazon S3 log archival
<a name="auditing-s3-log-archival"></a>

Enable Amazon S3 logging at cluster creation so that logs persist after nodes terminate. Console clusters enable it by default, and the CLI and API require you to specify it. Amazon EMR pushes logs every five minutes. Starting with Amazon EMR 6.9.0, logs are also archived immediately before nodes terminate during scale-down or shutdown.

There are three categories of logs:
+ **System logs** – Amazon EMR daemon and service logs, such as provisioning, instance state, and bootstrap actions.
+ **Application logs** – open-source framework logs per node, such as Hadoop, Spark, Hive, and HBase.
+ **Container logs** – stdout and stderr from YARN application containers, plus launch scripts and directory metadata.

You can encrypt log files in Amazon S3 with an AWS KMS customer managed key, on Amazon EMR 5.30.0 and later, excluding 6.0.0. Grant `kms:GenerateDataKey` to the EC2 instance profile and `kms:DescribeKey` to the Amazon EMR role, and add both as key users. Starting with Amazon EMR 7.11.0, you can control Amazon S3 upload behavior per log category using `S3LoggingConfiguration`, which is useful for compliance and data residency. For more information, see [Configure Amazon EMR cluster logging and debugging](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-debugging.html).

### AWS CloudTrail
<a name="auditing-cloudtrail"></a>

AWS CloudTrail captures all Amazon EMR API calls as events, including caller identity, source IP, timestamp, and request parameters. It is active by default and provides a searchable, immutable 90-day event history of management events at no charge. Create a trail to deliver logs to Amazon S3 for longer retention. There are two categories of events:
+ **Management events** – control plane operations such as `RunJobFlow`, `TerminateJobFlows`, `AddJobFlowSteps`, and `SetTerminationProtection`. These are logged by default. For more information, see the [Amazon EMR API Reference](https://docs.aws.amazon.com/emr/latest/APIReference/Welcome.html).
+ **Data events** – resource operations such as reading or writing an Amazon S3 object. These are not logged by default and must be enabled, and additional charges apply.

Deliver AWS CloudTrail logs to Amazon S3 and query them with Amazon Athena. For more information, see [Logging Amazon EMR API calls using AWS CloudTrail](https://docs.aws.amazon.com/emr/latest/ManagementGuide/logging_emr_api_calls.html) and [Querying AWS CloudTrail logs](https://docs.aws.amazon.com/athena/latest/ug/cloudtrail-logs.html).

### Identity propagation with EMR runtime roles
<a name="auditing-identity-propagation"></a>

When jobs are submitted using runtime roles, AWS CloudTrail records the runtime role as the actor, which hides the original submitter. To preserve end-user attribution, set `PropagateSourceIdentity` to true in the `ApplicationScopedIAMRoleConfiguration` of your security configuration. Amazon EMR then propagates the source identity to the runtime role session, which is visible in the AWS CloudTrail `sourceIdentity` field. For more information, see [Runtime roles for Amazon EMR Steps](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-steps-runtime-roles.html).

### Amazon CloudWatch
<a name="auditing-cloudwatch"></a>

Amazon EMR publishes cluster metrics every five minutes at no charge, including cluster status, HDFS utilization, YARN resource usage, and node health. Metrics are retained for 63 days. For more information, see [Monitoring Amazon EMR metrics with CloudWatch](https://docs.aws.amazon.com/emr/latest/ManagementGuide/UsingEMR_ViewingMetrics.html).

### Native CloudWatch Logs integration (Amazon EMR 7.11.0 and later)
<a name="auditing-cloudwatch-logs-native"></a>

Amazon EMR streams cluster logs to Amazon CloudWatch as they are generated, which provides near-real-time access, searchability, configurable retention, and streaming to OpenSearch or third-party platforms. You configure this integration at cluster creation, and it is available only when you submit applications through an Amazon EMR Step. There are three log types: `STEP_LOGS`, `SPARK_DRIVER`, and `SPARK_EXECUTOR`. Each captures `STDOUT` and `STDERR`, and by default only `STEP_LOGS` and `SPARK_DRIVER` are enabled. Logs are organized into a log group, by default `/aws/emr/{cluster_id}`, with streams named by Amazon EMR step ID or YARN container ID. Custom group names and prefixes are supported, and AWS KMS encryption at rest is optional.

The EC2 instance profile must have Amazon CloudWatch Logs permissions, and private-subnet clusters need a VPC endpoint for Amazon CloudWatch Logs. For more information, see [Publish Amazon EMR logs to CloudWatch Logs](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-cloudwatch-logs.html).

### CloudWatch agent (earlier releases)
<a name="auditing-cloudwatch-agent"></a>

For releases prior to 7.11.0, install and configure the CloudWatch agent through a bootstrap action to push application and system logs to Amazon CloudWatch Logs. Point the agent at the Hadoop log directories under `/mnt/var/log/`. For more information, see *Enhanced Monitoring with CloudWatch using custom metrics and logs*.

## Software patching
<a name="software-patching"></a>

Keeping Amazon EMR clusters up to date is a shared responsibility. Amazon EMR publishes new releases regularly with updated frameworks, security fixes, and OS patches. Use the latest release when possible.

### EMR release lifecycle
<a name="emr-release-lifecycle"></a>

Each release bundles a runtime (OS and JDK), core engines (Spark, Hive, Iceberg), and extras. Amazon EMR uses semantic versioning in the form major.minor.patch:
+ **Major releases** (7.x) introduce breaking changes, such as a new OS (AL2023) or JDK (Corretto 17).
+ **Minor releases** add new open-source versions and features. Amazon EMR aims for a new minor release at least every 90 days.
+ **Patch releases** contain backward-compatible fixes. Starting with Amazon EMR 5.36, 6.6, and 7.0, the latest patch uses the most recent Amazon Linux AMI.

Amazon EMR provides Standard Support for 24 months from release, then End of Support (12 months), then End of Life. Migrate before End of Support. For more information, see [Amazon EMR standard support](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-standard-support.html).

### OS-level patching
<a name="os-level-patching"></a>

Amazon EMR 7.x (AL2023) and 5.36 and later or 6.6 and later (AL2) clusters contain only the security updates in the Amazon Linux AMI selected at creation, and they do not install the latest at launch. To receive the latest, periodically recreate the cluster. Amazon EMR 5.0.0-5.35.0 and 6.0.0-6.5.0 (Amazon Linux AMI) auto-install critical and important updates at first boot, but kernel updates and reboot-requiring packages (NVIDIA, CUDA) are not installed automatically.

**Note**  
Avoid `sudo yum update`. It installs all packages indiscriminately and can cause incompatibilities.

You have two options:
+ Use the latest Amazon EMR patch release. Each ships the most recent Amazon Linux AMI. For more information, see [Using the default Amazon Linux AMI for Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-default-ami.html).
+ Use a custom AMI for specific patches, including the kernel. For more information, see [Using a custom AMI](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html).

### Application-level patching
<a name="application-level-patching"></a>

Open-source application versions are tied to the Amazon EMR release. Amazon EMR aims to include the latest stable upstream version within 90 days. To update, upgrade to a newer Amazon EMR release (recommended), as described in the [Amazon EMR Release Notes](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-whatsnew.html), or contact AWS Support for a specific patch.

### Software upgrades
<a name="software-upgrades"></a>

Upgrading the Amazon EMR release is the primary way to adopt updated frameworks, security fixes, and features. Each release bundles a specific set of application versions, OS, and JDK, so an upgrade requires launching a new cluster. You cannot upgrade in place.

#### Testing strategy
<a name="software-upgrades-testing-strategy"></a>
+ **Isolate test from production.** A Hive version upgrade might alter the Hive Metastore schema. If the test cluster shares a metastore with production, an unintended schema migration could impact production.
+ **Validate data quality.** Compare outputs on the old and new releases.
+ **Validate performance.** Benchmark for regressions.
+ **Test security configurations.** Test encryption, Kerberos, and IAM. JDK and TLS default changes can affect in-transit encryption and certificate compatibility.
+ **Test custom components.** Test bootstrap actions, custom AMIs, custom JARs such as a `TLSArtifactsProvider` or UDFs, and third-party libraries.

#### Upgrade process
<a name="software-upgrades-process"></a>

1. Review the Amazon EMR release notes and the upstream application release notes.

1. Launch a test cluster on the new release with the same security configuration, instance types, and applications as production.

1. Run your validation suite.

1. If validation passes, schedule the production upgrade. For transient clusters, update the automation to the new release label. For long-running clusters, use a blue/green rotation.

1. Monitor the new cluster closely and keep the old configuration for rollback.

#### Spark Upgrade Agent
<a name="software-upgrades-spark-agent"></a>

For Spark workloads, Amazon EMR provides the Apache Spark Upgrade Agent to upgrade existing Spark applications to the latest release. It analyzes code and configurations and identifies changes for compatibility. For more information, see [Spark Agents](spark-agents.md).

### Best practices
<a name="software-patching-best-practices"></a>
+ Use the latest Amazon EMR release for new clusters.
+ Test new releases in a non-production environment. The console clone cluster feature helps.
+ For transient clusters, patching is straightforward, because you launch each on the latest release.
+ For long-running clusters, plan for cluster rotation from the start. Externalize state to Amazon S3, automate provisioning with IaC such as CloudFormation or Terraform, build runbooks, and rotate monthly or quarterly.
+ Subscribe to the Amazon EMR Release Notes RSS feed.

## EMR security best practices
<a name="emr-security-best-practices"></a>
+ Design early with security in mind.
+ Ensure the supporting security department is involved early.
+ Understand the risks. Minimize attack surfaces and impact, because no system is entirely secure.
+ Use different security setups for different use cases, such as batch or ETL versus interactive.
+ Protect from unintentional network exposure with proper security group rules and Amazon EMR block public access.
+ Stay up to date with Amazon EMR and OS versions. Establish a patching cadence and test upgrades in non-production.

To learn more, see [Best Practices for Securing Amazon EMR](https://aws.amazon.com/blogs/big-data/best-practices-for-securing-amazon-emr/) on the AWS Big Data Blog.

## Common customer use cases
<a name="common-customer-use-cases"></a>

### Production cluster baseline configuration
<a name="use-case-production-baseline"></a>

This section describes the recommended security posture for every production cluster.


**Networking**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| Private subnet | Recommended | Cluster nodes must not be directly addressable from a public subnet. Place all instances in private subnets with no auto-assigned public IPs. | 
| VPC endpoints | Recommended | At minimum, a gateway endpoint for Amazon S3. Add interface endpoints for AWS KMS, AWS STS, and Amazon CloudWatch as needed. | 
| NAT gateway | Optional | Only provision if workloads require outbound internet access. Otherwise omit it to reduce attack surface and cost. | 


**Encryption**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| In-transit encryption (TLS) | Recommended | Enable TLS for all inter-node and client-to-cluster connections through Amazon EMR security configurations. | 
| At-rest encryption - EBS | Recommended | Encrypt all attached Amazon EBS volumes using AWS KMS. | 
| At-rest encryption - S3 | Recommended | Enforce SSE-S3 or SSE-KMS on all buckets for input, output, and logs. Pair this with bucket policies that deny unencrypted PutObject. | 
| Nitro-based instances | Recommended | Hardware-level encryption of in-transit data between instances in the same VPC, which adds defense-in-depth beyond application-layer TLS. | 


**Cluster access**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| No SSH key pair | Recommended | Do not attach an EC2 key pair. This eliminates direct SSH as an access vector. | 
| AWS Systems Manager (SSM) | Optional | Restrict Session Manager access to administrators and only during active troubleshooting. Limit ssm:StartSession to a narrow set of principals with tagging conditions. | 
| Security group lockdown | Recommended | Allow only intra-cluster traffic. Remove rules that permit 0.0.0.0/0 or broad CIDR ranges. | 
| Web UI access | Recommended | Use Live Application UIs from the Amazon EMR web console, or persistent application UIs for terminated clusters. These use the Amazon EMR managed proxy and need no direct network reachability, SSH tunnels, VPNs, or security group changes. | 

As a guiding principle, start with the most restrictive posture and open access only where a specific workload requires it. Document, justify, and periodically review each relaxation.

### Batch analytics pipelines
<a name="use-case-batch-analytics"></a>

Batch analytics pipelines are best orchestrated by submitting work as Amazon EMR Steps, which integrate with AWS Step Functions and Amazon MWAA.


**Job submission**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| EMR Steps | Recommended | Preferred mechanism for Spark and Hive batch jobs, with built-in lifecycle management, failure handling, and auditability. | 

#### Security: authorization with Lake Formation (Spark only)
<a name="use-case-batch-lake-formation"></a>


**Authorization with Lake Formation (Spark only)**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| Runtime roles | Required | Decouple job-level permissions from the instance profile for per-job least-privilege. | 
| Lake Formation integration in Security Configuration | Conditional | Enable when jobs require fine-grained access controls (column, row, or cell). | 
| Spark Full Table Access configuration | Conditional | Use instead of Lake Formation integration when tables are shared without fine-grained permissions. Configure Spark settings at job submission. | 

Use the following decision flow. If any accessed tables are shared with column or row filters, enable Lake Formation integration in the Security Configuration. If all accessed tables are shared with full-table access only, disable Lake Formation integration and configure Spark Full Table Access settings at job submission.

#### Security: authorization with IAM only (Hive and Spark)
<a name="use-case-batch-iam-only"></a>


**Authorization with IAM only (Hive and Spark)**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| EC2 instance profile (single-tenant cluster) | Sufficient | The instance profile's IAM policies govern all resource access. This is the simplest model. | 
| Runtime roles (multi-tenant cluster) | Recommended | Isolate each job's permissions. This prevents lateral access and supports per-job audit through AWS CloudTrail. | 

As a guiding principle, default to runtime roles unless you have a dedicated single-tenant cluster.

### Streaming analytics pipelines
<a name="use-case-streaming-analytics"></a>

Streaming analytics pipelines are long-running. Submit work through Amazon EMR Steps. The security model varies by engine.


**Spark Streaming: authorization with Lake Formation**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| Runtime roles | Required | Per-job IAM role isolation for streaming Amazon EMR Steps. | 
| Spark Full Table Access configuration | Required | Only Full Table Access mode is supported for streaming. Configure it at job submission. | 
| Lake Formation integration in Security Configuration | Do not enable | Fine-grained Lake Formation access control is not supported for Spark Streaming. | 


**Spark Streaming: authorization with IAM only**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| EC2 instance profile (single-tenant) | Sufficient | The instance profile governs all access. | 
| Runtime roles (multi-tenant) | Required | Isolate each job's permissions. | 


**Flink**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| EC2 instance profile | Required | Flink is not integrated with runtime roles or Lake Formation. The instance profile is the sole mechanism. | 

### Interactive analytics
<a name="use-case-interactive-analytics"></a>

In interactive analytics, users query through SQL engines or notebooks. Address user authentication and fine-grained access control.


**Spark**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| Runtime roles | Required | Interactive notebooks are multi-user. Each user session gets its own scoped IAM role. | 
| Lake Formation integration in Security Configuration | Conditional | Enable for fine-grained (column or row) permissions. | 
| Spark Full Table Access configuration | Conditional | Use instead when tables are shared without fine-grained permissions. Configure it at session creation. | 
| Client tooling | Recommended | Use Amazon SageMaker Unified Studio (recommended), Amazon EMR Studio, or Amazon SageMaker AI Studio. | 

#### Trino and Hive
<a name="use-case-interactive-trino-hive"></a>

Trino and Hive are not integrated with runtime roles or Lake Formation.


**AWS-only solution**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| EMR Native LDAP integration | Required | Provides user authentication for interactive query access. | 
| Hue | Recommended | Query submission interface integrated with LDAP. | 
| Open-source access control | Required | Hive SQL Authorization for Hive, and file-based access control for Trino. | 

**Note**  
The EC2 instance profile must have IAM permissions covering the superset of all user data access. The open-source layer narrows each user down to their authorized subset.


**Partner solution**  

| Configuration | Requirement | Rationale | 
| --- | --- | --- | 
| Privacera (Ranger) | Optional | Centralized fine-grained access control for Trino and Hive. | 

### HBase
<a name="use-case-hbase"></a>

HBase is not integrated with runtime roles or Lake Formation. Security depends on the trust boundary.


**HBase security by scenario**  

| Scenario | Configuration | Rationale | 
| --- | --- | --- | 
| Trusted, controlled ingestors | Network-level isolation | Restrict cluster access through security groups and subnet boundaries. | 
| Untrusted or external clients | Kerberos authentication | Enable Kerberos when clients cannot be controlled through networking alone. | 
| Multi-source access with varying permissions | HBase ACLs | Fine-grained authorization over tables, column families, and cells. | 
| HBase on S3 | EC2 instance profile with Amazon S3 access | The instance profile must have IAM permissions to the HBase root Amazon S3 location for StoreFile reads and writes. | 