View a markdown version of this page

Multitenancy on EMR - Amazon EMR Migration Guide

Multitenancy on EMR

Amazon EMR provides a comprehensive set of features to build highly secure multitenant big data processing environments. Multitenancy enables organizations to share infrastructure across teams, business units, or external tenants while maintaining strict isolation of data, resources, and user access. With the evolution of EMR across three deployment models — Amazon EMR on Amazon EC2, Amazon EMR on Amazon EKS, and EMR Serverless — organizations have multiple architectural options for implementing multi-tenancy, each with unique characteristics for isolation, cost management, and operational overhead. This chapter discusses implementing multitenancy across all deployment models, key dimensions (user, data, and resource isolation), and recommended best practices.

Note

For operational cluster topology decisions, such as instance types, lifecycle segmentation, and cost allocation, see Amazon EMR Cluster Segmentation Schemes.

Key challenges of multitenancy

Regardless of the deployment model, multitenant environments share a common set of challenges.

  • Implementing isolation at all pipeline stages requires understanding the nuances of each deployment model's processes and tools.

  • Metering tenant resource usage is difficult when tenants share metadata and compute resources.

  • Scalability challenges arise when onboarding new tenants.

  • Applying robust security controls across authentication, authorization, and resource management can be a daunting task.

Amazon EMR on Amazon EC2: multi-tenancy models

There are three conceptual models for isolating users, data, and resources when building multitenant analytics on Amazon EMR on Amazon EC2: Silo mode, Shared mode, and Hybrid mode.

Silo mode

In Silo mode, each tenant gets their own EMR cluster with specific tools for processing and analyzing their datasets. Data is stored in the tenant's Amazon S3 bucket or in HDFS on the cluster. The Hive metastore is typically on the cluster or stored externally on Amazon RDS. You can use the AWS Glue Data Catalog as a central metadata catalog.

Consider an example silo scenario with three users, each launching their own clusters:

  • A data engineer installs Apache Spark and Apache Hive to manipulate data and store results in Amazon S3.

  • An analyst runs Spark SQL and Trino to explore datasets and send results to their own Amazon S3 bucket.

  • A data scientist uses the cluster to run machine learning or deep learning frameworks.

Diagram of an example multi-tenant silo mode scenario on Amazon EMR.

Figure 17: Example silo mode scenario

In this model, you can configure a cluster to terminate automatically after all processing steps complete (a transient cluster). This provides total segregation per tenant and decreases costs, because you are charged only for the run duration.

Advantages and disadvantages of silo mode
Advantage Disadvantage
Provides complete isolation of data and resources. Sharing data across clusters (especially when using HDFS) can be difficult.
Can be cost effective when used with Spot Instances and transient clusters. Launching individual clusters can be expensive.
Easy to measure usage of resources per tenant.

Shared mode

In Shared mode, tenants share the EMR cluster, with tools for processing, analyzing, and data science installed in one cluster. Datasets are stored in the tenant's Amazon S3 bucket or HDFS folder. The Hive metastore can be on the cluster or externally on Amazon RDS or the AWS Glue Data Catalog. This mode is more common in many organizations and is a cost-effective way to run large Hadoop installations through economies of scale.

A large multi-node cluster with all tools can support a variety of users, including end users launching edge nodes for data science platforms. Although cost effective, a tenant might monopolize resources and cause SLAs to be missed for others.

Diagram of an example multi-tenant shared mode scenario on Amazon EMR.

Figure 18: Example shared mode scenario

Advantages and disadvantages of shared mode
Advantage Disadvantage
Less operational burden, because there is one cluster to maintain. Hard to measure usage and resources when you have many tenants.
Can be cost effective if the cluster is well-utilized. Configuring the YARN scheduler can be difficult and complex.
Cannot customize the cluster for individual workloads (instance type, volumes) for specific workload types.
One configuration to fit all use cases; cluster configuration is immutable and teams must optimize applications rather than adjust cluster configuration.
Software cannot be upgraded without upgrading all applications.
Large blast radius if something goes wrong with the cluster.

Hybrid mode

In Hybrid mode, some tenants receive dedicated EMR resources (silo) while others share a common set of resources (pool), creating a hybrid model. The decision on which tenants are siloed versus pooled is driven by tenant tier, regulatory requirements, data sensitivity, performance SLAs, and cost. Data is stored in tenant-specific Amazon S3 prefixes or buckets, with shared AWS Glue Data Catalog tables governed by AWS Lake Formation fine-grained access control (FGAC). The model balances the strong isolation of silo mode with the cost efficiency and operational simplicity of shared mode.

Diagram of an example multi-tenant hybrid mode scenario on Amazon EMR.

Figure 19: Example Hybrid mode scenario

The infrastructure is logically divided into two tiers.

  • Premium tier (siloed) — Tenants with strict compliance, high data sensitivity, or performance SLAs receive dedicated EMR clusters (Amazon EMR on Amazon EC2), dedicated virtual clusters with isolated node pools (Amazon EMR on Amazon EKS), or dedicated EMR Serverless applications.

  • Standard tier (shared) — Tenants with moderate isolation requirements share a common EMR cluster (Amazon EMR on Amazon EC2), share a Kubernetes namespace with ResourceQuota constraints (Amazon EMR on Amazon EKS), or share an EMR Serverless application for per-user data access controls.

Both tiers share common governance infrastructure — the AWS Glue Data Catalog, AWS Lake Formation permissions, IAM Identity Center for authentication, and centralized monitoring through Amazon CloudWatch. This ensures consistent security policies and audit capabilities across all tenants regardless of tier.

The hybrid architecture combines siloed and shared approaches into one framework, organizing tenants into Premium and Standard tiers. Premium tenants receive dedicated EMR clusters (EC2, EKS, or Serverless) with isolated Amazon S3 buckets and tenant-specific AWS KMS keys. Standard tenants share EMR resources — YARN queues, Kubernetes namespaces, or shared Serverless applications — with data access governed by the row-level, column-level, and cell-level filtering of AWS Lake Formation. Both tiers share common governance: the AWS Glue Data Catalog as the central metastore, per-tenant IAM roles, and IAM Identity Center for authentication. The data flow starts with authentication, followed by tier resolution, after which requests route to either shared or dedicated resources. Amazon CloudWatch, AWS CloudTrail, and AWS Cost Explorer provide unified observability and per-tenant billing. This model suits tiered SaaS platforms, regulated industries, and managed service providers balancing cost efficiency with strict isolation.

Amazon EMR on Amazon EC2: implementing multi-tenancy considerations

A multitenant architecture with Amazon EMR on Amazon EC2 requires careful planning along critical dimensions, including user, data, and resource isolation.

User isolation

Authentication

Authentication of users is critical in securing cluster resources and preventing unauthorized access to data. Amazon EMR on Amazon EC2 provides flexibility to implement various mechanisms, such as IAM, IAM Identity Center (single sign-on), Kerberos, and LDAP. For detailed implementation, see Securing your Resources on Amazon EMR.

Data isolation

Authorization

After users are authenticated, consider what data assets they are authorized to use. You can implement authorization at the storage layer or the server layer. Amazon EMR on Amazon EC2 supports IAM role-based access control, Amazon S3 Access Grants, and AWS Lake Formation for fine-grained access control. For detailed implementation, see Securing your Resources on Amazon EMR.

Resource isolation

YARN queue management

On EMR, you can use different YARN queues to submit jobs. Each queue might have a different resource capacity and be associated with specific users and groups. The YARN Capacity Scheduler enables a hierarchy of queues to partition cluster resources among tenants. For detailed guidance, see Configure Hadoop YARN CapacityScheduler on Amazon EMR on Amazon EC2 for Multi-Tenant Heterogeneous Workloads.

For example, a user from the engineers group can log in to the EMR primary node and submit jobs to the engineers YARN queue.

Screenshot of the YARN Resource Manager user interface.

Figure 20: YARN Resource Manager UI

ssh -l engineer <<emr-dns>> [engineer@ 10-10-1-222 ~] spark-submit \ --queue engineers \ --class org.apache.spark.examples.SparkPi \ --master yarn \ /usr/lib/spark/examples/jars/spark-examples.jar

In this example, the user engineer submits a Spark job and passes a --queue parameter to reflect which queue runs the job. The YARN ResourceManager UI shows the same job being performed.

Diagram showing example application code running on Amazon EMR.

Figure 22: Example code on Amazon EMR

Diagram of an engineer submitting a Spark job to YARN on Amazon EMR.

Figure 23: User engineer submitting Spark job in YARN

Note

YARN queues apply only to applications that run on YARN. Trino (formerly Presto) applications do not use YARN queues and have their own resource management mechanisms.

Key considerations

The multi-tenancy capabilities of Amazon EMR on Amazon EC2 are built on the silo and shared paradigms, well-suited for organizations with existing Hadoop workloads. These patterns are augmented with updated AWS Lake Formation FGAC (table-level, row-level, column-level, and cell-level access), open table format support, and write operation enforcement available from EMR 7.12 onward. Additional security enhancements include Trusted Identity Propagation and Amazon S3 Access Grants for identity-aware data access.

When designing a multi-tenant architecture on Amazon EMR on Amazon EC2, the primary consideration is whether workloads require HDFS, because this is the key driver for choosing Amazon EMR on Amazon EC2 over serverless alternatives. Align your authentication mechanism with your existing identity infrastructure, whether Active Directory/LDAP, a SAML IdP, or IAM Identity Center. Use AWS Lake Formation FGAC for data-level tenant isolation, taking advantage of write operation enforcement and open table format support to avoid the operational overhead of maintaining separate clusters per access pattern.