

# EMR clusters on Amazon Outposts
<a name="emr-plan-outposts"></a>

Beginning with Amazon EMR 5.28.0, you can create and run EMR clusters on Amazon Outposts. Amazon Outposts enables native Amazon services, infrastructure, and operating models in on-premises facilities. In Amazon Outposts environments, you can use the same Amazon APIs, tools, and infrastructure that you use in the Amazon Cloud. Amazon EMR on Amazon Outposts is ideal for low latency workloads that need to be run in close proximity to on-premises data and applications. For more information about Amazon Outposts, see [Amazon Outposts User Guide](https://docs.aws.amazon.com/outposts/latest/userguide/). 

## Prerequisites
<a name="emr-outposts-prereq"></a>

 The following are the prerequisites for using Amazon EMR on Amazon Outposts:
+ You must have installed and configured Amazon Outposts in your on-premises data center.
+ You must have a reliable network connection between your Outpost environment and an Amazon Region.
+ You must have sufficient capacity for Amazon EMR supported instance types available in your Outpost.

## Limitations
<a name="emr-outposts-limit"></a>

The following are the limitations of using Amazon EMR on Amazon Outposts:
+ On-Demand Instances are the only supported option for Amazon EC2 instances. Spot Instances are not available for Amazon EMR on Amazon Outposts.
+ If you need additional Amazon EBS storage volumes, only General Purpose SSD (GP2) is supported. 
+ When you use Amazon Outposts with Amazon EMR releases 5.28 through 6.x, you can only use S3 buckets that store objects in an Amazon Web Services Region that you specify. With Amazon EMR 7.0.0 and higher, Amazon EMR on Amazon Outposts is also supported with the S3A filesystem client, prefix `s3a://`.
+ Only the following instance types are supported by Amazon EMR on Amazon Outposts:    
[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/en_us/emr/latest/ManagementGuide/emr-plan-outposts.html)

## Network connectivity considerations
<a name="emr-outposts-considerations"></a>
+ If network connectivity between your Outpost and its Amazon Region is lost, your clusters will continue to run. However, you cannot create new clusters or take new actions on existing clusters until connectivity is restored. In case of instance failures, the instance will not be automatically replaced. Additionally, actions such as adding steps to a running cluster, checking step execution status, and sending CloudWatch metrics and events will be delayed. 
+ We recommend that you provide reliable and highly available network connectivity between your Outpost and the Amazon Region. If network connectivity between your Outpost and its Amazon Region is lost for more than a few hours, clusters that have enabled terminate protection will continue to run, and clusters that have disabled terminate protection may be terminated. 
+ If network connectivity will be impacted due to routine maintenance, we recommend proactively enabling terminate protection. More generally, connectivity interruption means that any external dependencies that are not local to the Outpost or customer network will not be accessible. This includes Amazon S3, DynamoDB used with EMRFS consistency view, and Amazon RDS if an in-region instance is used for an Amazon EMR cluster with multiple primary nodes.

## Creating an Amazon EMR cluster on Amazon Outposts
<a name="emr-outposts-create"></a>

Creating an Amazon EMR cluster on Amazon Outposts is similar to creating an Amazon EMR cluster in the Amazon Cloud. When you create an Amazon EMR cluster on Amazon Outposts, you must specify an Amazon EC2 subnet associated with your Outpost.

An Amazon VPC can span all of the Availability Zones in an Amazon Region. Amazon Outposts are extensions of Availability Zones, and you can extend an Amazon VPC in an account to span multiple Availability Zones and associated Outpost locations. When you configure your Outpost, you associate a subnet with it to extend your Regional VPC environment to your on-premises facility. Outpost instances and related services appear as part of your Regional VPC, similar to an Availability Zone with associated subnets. For information, see [Amazon Outposts User Guide](https://docs.aws.amazon.com/outposts/latest/userguide/).

**Console**

To create a new Amazon EMR cluster on Amazon Outposts with the Amazon Web Services Management Console, specify an Amazon EC2 subnet that is associated with your Outpost.

------
#### [ Console ]

**To create a cluster on Amazon Outposts with the console**

1. Sign in to the Amazon Web Services Management Console, and open the Amazon EMR console at [https://console.amazonaws.cn/emr](https://console.amazonaws.cn/emr).

1. Under **EMR on EC2** in the left navigation pane, choose **Clusters**, and then choose **Create cluster**.

1. Under **Cluster configuration**, select **Instance groups** or **Instance fleets**. Then, choose an instance type from the **Choose EC2 instance type** dropdown menu or select **Actions** and choose **Add EBS volumes**. Amazon EMR on Amazon Outposts supports limited Amazon EBS volume and instance types.

1. Under **Networking**, select an EC2 subnet with an Outpost ID in this format: op-123456789.

1. Choose any other options that apply to your cluster. 

1. To launch your cluster, choose **Create cluster**.

------
#### [ CLI ]

**To create a cluster on Amazon Outposts with the Amazon CLI**
+ To create a new Amazon EMR cluster on Amazon Outposts with the Amazon CLI, specify an EC2 subnet that is associated with your Outpost, as in the following example. Replace *subnet-22XXXX01* with your own Amazon EC2 subnet ID.

  ```
  aws emr create-cluster \
  --name "Outpost cluster" \
  --release-label emr-7.13.0 \
  --applications Name=Spark \
  --ec2-attributes KeyName=myKey SubnetId=subnet-22XXXX01 \
  --instance-type m5.xlarge --instance-count 3 --use-default-roles
  ```

------