AWS Amazon EMR Cluster

This page shows how to write Terraform and CloudFormation for Amazon EMR Cluster and write them securely.

aws_emr_cluster (Terraform)

The Cluster in Amazon EMR can be configured in Terraform with the resource name aws_emr_cluster. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L1
resource "aws_emr_cluster" "cluster_ok" {
  name          = "emr-test-arn"
  release_label = "emr-4.6.0"
  applications  = ["Spark"]

  ec2_attributes {
main.tf#L1
resource "aws_emr_cluster" "cluster_ok" {
  name          = "emr-test-arn"
  release_label = "emr-4.6.0"
  applications  = ["Spark"]

  ec2_attributes {

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides an Elastic MapReduce Cluster, a web service that makes it easy to process large amounts of data efficiently. See Amazon Elastic MapReduce Documentation for more information. To configure Instance Groups for task nodes, see the aws_emr_instance_group resource.

AWS::EMR::Cluster (CloudFormation)

The Cluster in EMR can be configured in CloudFormation with the resource name AWS::EMR::Cluster. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

dw_data_lake.yml#L36
    Type: 'AWS::EMR::Cluster'
  crmTransformationPipelineStepFunctions:
    Type: 'AWS::StepFunctions::StateMachine'
    Properties:
      RoleArn: ''
bp.yml#L36
    Type: 'AWS::EMR::Cluster'
  crmTransformationPipelineStepFunctions:
    Type: 'AWS::StepFunctions::StateMachine'
    Properties:
      RoleArn: ''
emr_cluster_without_security_configuration.yml#L23
    Type: AWS::EMR::Cluster
    Properties:
      Instances:
        MasterInstanceGroup:
          InstanceCount: 1
          InstanceType: m1.medium
emr_cluster_with_disabled_encryption_options.yml#L20
    Type: AWS::EMR::Cluster
    Properties:
      Instances:
        MasterInstanceGroup:
          InstanceCount: 1
          InstanceType: m1.medium
emr.yml#L19
    Type: 'AWS::EMR::Cluster'
    Properties:
      Instances:
        MasterInstanceGroup:
          InstanceCount: 1
          InstanceType: m5.xlarge
createEMRffromDOC.json#L5
      "Type": "AWS::EMR::Cluster",
      "Properties": {
        "Instances": {
          "Ec2KeyName" : "ukmyjorgeawstestkeypair",
          "HadoopVersion" : "Amazon 2.8.5",
          "MasterInstanceGroup": {
EMR.json#L3
  "resourceType" : "AWS::EMR::Cluster",
  "properties" : [ {
    "propertyName" : "AdditionalInfo",
    "propertyType" : "JsonObject",
    "required" : false
  }, {
emr_cluster_without_security_configuration.json#L26
            "Type": "AWS::EMR::Cluster",
            "Properties": {
                "Instances": {
                    "MasterInstanceGroup": {
                        "InstanceCount": 1,
                        "InstanceType": "m1.medium",
emr_cluster_with_disabled_encryption_options.json#L22
            "Type": "AWS::EMR::Cluster",
            "Properties": {
                "Instances": {
                    "MasterInstanceGroup": {
                        "InstanceCount": 1,
                        "InstanceType": "m1.medium",
emr_template.json#L15
        "Type":"AWS::EMR::Cluster::InstanceType"
    },
    "CoreInstanceType":{
      "Description":"Instance type to be used for core instances.",
      "Type":"String",
      "AllowedValues":[

Parameters

Explanation in CloudFormation Registry

The AWS::EMR::Cluster resource specifies an Amazon EMR cluster. This cluster is a collection of Amazon EC2 instances that run open source big data frameworks and applications to process and analyze vast amounts of data. For more information, see the Amazon EMR Management Guide.

Frequently asked questions

What is AWS Amazon EMR Cluster?

AWS Amazon EMR Cluster is a resource for Amazon EMR of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon EMR Cluster?

For Terraform, the SnidermanIndustries/checkov-fork and melscoop-test/check source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the demeritiusg/data_warehouse-pipelines, demeritiusg/AWS-Examples and stelligent/cfn_nag source code examples are useful. See the CloudFormation Example section for further details.