fbpx
POSThttps://api.spotinst.io/aws/emr/mrScaler?accountId={ACCOUNT_ID}

Create a new EMR cluster

URL Parameters

ParameterTypeDescription
ACCOUNT_ID String

Your Spotinst accountId associated with your token

Example: act-123abc
Request

Headers
{
  "Content-Type": "application/json",
  "Authorization": "Bearer ${token}"
}
Body
Copied!
Downloaded!
{
  "mrScaler": {
    "name": "my MRScaler",
      "description": "Spotinst MRScaler",
        "region": "us-west-2",
          "strategy": {
            "wrapping" : {"sourceClusterId": "c-1234"
},
  			  "new":{
              	"releaseLabel":"emr-5.17.0",
                "numberOfRetries":5
              },
              "cloning": {
                "originClusterId":"j-38EE27G2QY02I",
                  "includeSteps": false,
                   "numberOfRetries":5
              },
                "provisioningTimeout": {
                  "timeout": 15,
                    "timeoutAction": "terminate"
                }
                },
                  "compute": {
                    "ebsRootVolumeSize": 4,
                    "availabilityZones": [
                      {
                        "name": "us-west-2a",
                        "subnetId": "subnet-3b5b3601"
                      },
                      {
                        "name": "us-west-2b",
                        "subnetId": "subnet-6b5c4209"
                      }
                    ],
                      "bootstrapActions": {
                        "file": {
                          "bucket": "emr-test",
                            "key": "MyFile.json"
                        }
                      },  
                        "instanceGroups": {
                          "masterGroup": {
                            "instanceTypes": [
                              "m3.xlarge",
                              "m4.large",
                              "m4.xlarge",
                              "m4.2xlarge"
                            ],
                              "target": 1,
                              "lifeCycle": "ON_DEMAND",
                              "configurations": {
                                  "file": {
                                    "bucket": "spotinst-labs",
                                      "key": "emr_configurations.json"
                                  }
                                }
                          },
                            "coreGroup": {
                              "instanceTypes": [
                                "m3.xlarge",
                                "m4.large",
                                "m4.xlarge",
                                "m4.2xlarge"
                              ],
								"capacity": {
                                    "minimum": 0,
                                      "maximum": 15,
                                        "target": 5,
                                          "unit": "instance"
                                  },
                                  "lifeCycle": "SPOT",
                                    "ebsConfiguration": {
                                      "ebsBlockDeviceConfigs": [
                                        {
                                          "volumeSpecification": {
                                            "volumeType": "io1",
                                            "sizeInGB": 8,
                                            "iops": 200
                                          },
                                          "volumesPerInstance": 1
                                        }
                                      ],
                                        "ebsOptimized": true
                                    },
                                    "configurations": {
                                        "file": {
                                          "bucket": "spotinst-labs",
                                            "key": "emr_configurations.json"
                                        }
                                      }                                      
                            },
                              "taskGroup": {
                                "instanceTypes": [
                                  "m1.medium",
                                  "c3.xlarge",
                                  "m3.xlarge"
                                ],
                                  "capacity": {
                                    "minimum": 0,
                                      "maximum": 30,
                                        "target": 15,
                                          "unit": "instance"
                                  },
                                    "lifeCycle": "SPOT",
                                      "ebsConfiguration": {
                                        "ebsBlockDeviceConfigs": [
                                          {
                                            "volumeSpecification": {
                                              "volumeType": "gp2",
                                              "sizeInGB": 8
                                            },
                                            "volumesPerInstance": 1
                                          },
                                          {
                                            "volumeSpecification": {
                                              "volumeType": "io1",
                                              "sizeInGB": 32,
                                              "iops": 200
                                            },
                                            "volumesPerInstance": 2
                                          }
                                        ],
                                          "ebsOptimized": true
                                      },
                                      "configurations": {
                                          "file": {
                                            "bucket": "spotinst-labs",
                                              "key": "emr_configurations.json"
                                          }
                                        }
                              }
                        },
                        "instanceWeights": [
                          {
						     "instanceType": "m4.large",
						     "weightedCapacity": 3
                          },
                          {
                             "instanceType": "m4.xlarge",
                             "weightedCapacity": 5
				          }
                        ],
                       "emrManagedMasterSecurityGroup":"sg-123456789",
                       "emrManagedSlaveSecurityGroup":"sg-123456789",
                       "additionalMasterSecurityGroups":["sg-123456789"],
						"additionalSlaveSecurityGroups":["sg-123456789"],
                       "serviceAccessSecurityGroup": "EMR_DefaultRole",
                       "customAmiId":"ami-123456789",
                       "repoUpgradeOnBoot":"SECURITY",
                       "tags": [
            				{
              				"tagKey": "Creator",
              				"tagValue": "testUser"
            				}
          				],
                       "ec2KeyName":"Test-key",
                       "applications":[
                          {
                              "name":"Ganglia",
                              "version": "1.0"
                          },
                          {"name":"Hadoop"},
                          {"name":"Hive"},
                          {"name":"Hue"},
                          {"name":"Mahout"},
                          {"name":"Pig"},
                          {"name":"Tez"}
                       ],                         
                          "configurations": {
                            "file": {
                              "bucket": "spotinst-labs",
                                "key": "emr_configurations.json"
                            }
                          }
                  },
                 "cluster":{
                     "terminationProtected":false,
                     "keepJobFlowAliveWhenNoSteps": true,
                     "logUri":"s3://job-status",
                     "additionalInfo":"{'test':'more information'}",
                     "jobFlowRole": "EMR_EC2_DefaultRole",
                     "securityConfiguration":"test-config"
                  },
                   "scheduling": {
                   	"tasks": [
                    		{
                              "isEnabled": true,
                              "instanceGroupType": "task",
                              "taskType": "setCapacity",
                              "cronExpression": "* 8 * 10 *",
                              "targetCapacity": 2,
                              "minCapacity": 2,
                              "maxCapacity": 2
                        	}
                    	]
        			},
                    "scaling": {
                      "up": [
                        {
                          "metricName": "AppsPending",
                          "statistic": "average",
                          "unit": "count",
                          "threshold": 100,
                          "adjustment": 2,
                          "namespace": "AWS/ElasticMapReduce",
                          "period": 300,
                          "evaluationPeriods": 1,
                          "action":{
                            "type":"adjustment",
                            "adjustment":1,
                            "minTargetCapacity": 1,
                            "target":5,
                            "minimum":1,
                            "maximum":10
                          },
                          "cooldown": 600,
                          "dimensions": [
                            {
                              "name": "JobFlowId"
                            }
                          ],
                          "operator": "gte"
                        }
                      ],
                        "down": [
                          {
                            "metricName": "AppsPending",
                            "statistic": "average",
                            "unit": "count",
                            "threshold": 10,
                            "adjustment": 2,
                            "namespace": "AWS/ElasticMapReduce",
                            "period": 300,
                            "evaluationPeriods": 1,
                          "action":{
                            "type":"adjustment",
                            "adjustment":1,
                            "minTargetCapacity": 1,
                            "target":5,
                            "minimum":1,
                            "maximum":10
                          },
                            "cooldown": 600,
                            "dimensions": [
                              {
                                "name": "JobFlowId"
                              }
                            ],
                            "operator": "lte"
                          }
                        ]
                    }
              }
            }

Body Attributes


  • name * String
    MRScaler name
  • description String
    Describe your Mr Scaler
  • region * String
    The region of the source cluster
  • strategy.wrapping * Object
    (Required. Unless strategy.cloning, or strategy.new strategy is specified) In wrap mode, MRScaler will manage an existing cluster and will scale up/down cluster task groups only. MRScaler will manage only instance groups that were created by Spotinst
  • strategy.wrapping.sourceClusterId * String
    (Required in wrap strategy only) The id of the cluster to wrap
  • strategy.new String
    (Required. Unless strategy.wrapping or strategy.cloning strategy is specified) In new mode, MRScaler will create a new cluster with the parameters specified in the request
  • strategy.new.releaseLabel String
    EMR release label that the cluster will be created using
  • strategy.new.numberOfRetries Integer
    the amount of times to retry provisioning capacity if provisioning timeout is exceeded Example: 1-5
  • strategy.cloning * Object
    (Required. Unless strategy.wrapping or strategy.new strategy is specified) In clone mode, MRScaler will create a new cluster that will be copied from the origin cluster. MRScaler will manage the entire cluster (the origin cluster will not be affected)
  • strategy.cloning.numberOfRetries Integer
    the amount of times to retry provisioning capacity if provisioning timeout is exceeded
    Example: 1-5
  • strategy.cloning.originClusterId * String
    (Required in clone strategy only) The id of the cluster to clone (required in clone strategy only)
  • strategy.cloning.includeSteps * Boolean
    (Required in clone strategy only) include cloning of steps from the original cluster or not
  • strategy.provisioningTimeout Object
    EMR clusters occasionally get stuck in provisioning status due to unhealthy clusters, slowness or other issues. In such cases, a timeout can be used to automatically terminate the cluster after the defined period of time.
  • strategy.provisioningTimeout.timeout Integer
    Time (minutes) after which the cluster is automatically terminated if it's still in provisioning status.
    Minimum: 15
  • strategy.provisioningTimeout.timeoutAction String
    The action to take if the timeout is exceeded. Currently terminate and terminateAndRetry is supported.
    Example: terminate, terminateAndRetry
  • compute.ebsRootVolumeSize Integer
    The EBS root volume size in GB
  • compute.availabilityZones Array<Object>
    Array of availability objects
  • compute.availabilityZones.name * String
    The availability zone name (required in clone strategy only)
  • compute.availabilityZones.subnetId * String
    (Required) Specify EC2 \ VPC subnet id (required in clone strategy only)
  • compute.bootstrapActions Object
    Describe bootstrap action. for more information please see: https://api.spotinst.com/elastigroup-for-aws/services-integrations/elastic-mapreduce/import-an-emr-cluster/advanced/
    Example: "bootstrapActions": { "file": { "bucket": "emr-test", "key": "MyFile.json" } }
  • compute.bootstrapActions.file Object
    Describe the bootstrap file information
  • compute.bootstrapActions.file.bucket String
    The S3 Bucket name
  • compute.bootstrapActions.file.key String
    The S3 Bucket key
  • compute.instanceGroups.masterGroup.instanceTypes * Array<String>
    The types to choose from for master group (required in clone strategy only)
  • compute.instanceGroups.masterGroup.lifeCycle * String
    The life cycle of master group. Possible values: SPOT, ON_DEMAND
  • compute.instanceGroups.masterGroup.ebsConfiguration Object
    Information about the EBS configurations that will be attached to each EC2 instance in the instance group.
  • compute.instanceGroups.masterGroup.target * Integer
    Number of instances in the master group (always set to 1) (required in clone strategy only)
  • compute.instanceGroups.masterGroup.configurations Object
    Information about the configurations file that will be used in the master instance group
  • compute.instanceGroups.masterGroup.configurations.file.bucket String
    s3 bucket name for the configurations file for the master instance group
  • compute.instanceGroups.masterGroup.configurations.file.key String
    s3 key name for the configurations file for the master instance group
  • compute.instanceGroups.coreGroup.instanceTypes * Array<String>
    (Required in clone strategy only) The types to choose from for core group
  • compute.instanceGroups.coreGroup.lifeCycle * String
    (Required in clone strategy only) The life cycle of core group. Possible values: SPOT, ON_DEMAND
  • compute.instanceGroups.coreGroup.capacity.target * Integer
    Example: Number of desired instances in task groups
  • compute.instanceGroups.coreGroup.capacity.minimum * Integer
    The lower limit of instances in task groups
  • compute.instanceGroups.coreGroup.capacity.maximum * Integer
    The upper limit of instances in task groups
  • compute.instanceGroups.coreGroup.capacity String
    Unit of task group for target, min and max. The unit could be "instance" or "weight". instance - amount of instances. weight - amount of vCPU.
    Default: instance
  • compute.instanceGroups.coreGroup.ebsConfiguration Object
    Information about the EBS configurations that will be attached to each EC2 instance in the instance group.
  • compute.instanceGroups.coreGroup.configurations Object
    Information about the configurations file that will be used in the core instance group
  • compute.instanceGroups.coreGroup.configurations.file.bucket String
    s3 bucket name for the configurations file for the core instance group
  • compute.instanceGroups.coreGroup.configurations.file.key String
    s3 key name for the configurations file for the core instance group
  • compute.instanceGroups.taskGroup.ebsConfiguration Object
    (Optional) information about the EBS configurations that will be attached to each EC2 instance in the instance group.
  • compute.instanceGroups.taskGroup.instanceTypes * Array<String>
    The types to choose from for task group
  • compute.instanceGroups.taskGroup.capacity.target * Integer
    Number of desired instances in task groups
  • compute.instanceGroups.taskGroup.capacity.minimum * Integer
    The lower limit of instances in task groups
  • compute.instanceGroups.taskGroup.capacity.maximum * Integer
    The upper limit of instances in task groups
  • compute.instanceGroups.taskGroup.capacity.unit String
    Unit of task group for target, min and max. The unit could be "instance" or "weight". instance - amount of instances. weight - amount of vCPU.
    Default: instance
  • compute.instanceGroups.taskGroup.configurations Object
    Information about the configurations file that will be used in the task instance group
  • compute.instanceGroups.taskGroup.configurations.file.bucket String
    s3 bucket name for the configurations file for the task instance group
  • compute.instanceGroups.taskGroup.configurations.file.key String
    s3 key name for the configurations file for the task instance group
  • compute.instanceGroups.{GROUP}.ebsConfiguration.ebsOptimized Boolean
    Indicates whether an Amazon EBS volume is EBS-optimized.
  • compute.instanceGroups.{GROUP}.ebsConfiguration.ebsConfigs Array<Object>
    An array of Amazon EBS volume specifications attached to a cluster instance.
  • compute.instanceGroups.{GROUP}.ebsConfiguration.ebsConfigs.VolumesPerInstance * Integer
    Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group (Required if ebsconfigs is defined)
  • compute.instanceGroups.{GROUP}.ebsConfiguration.ebsConfigs.VolumeSpecification * Object
    EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster (required if ebsConfigs is defined).
  • compute.instanceGroups.{GROUP}.ebsConfiguration.ebsConfigs.VolumeSpecification.VolumeType * String
    The volume type. Volume types supported are gp2, io1, standard (required if ebsConfigs is defined).
  • compute.instanceGroups.{GROUP}.ebsConfiguration.ebsConfigs.VolumeSpecification.Iops Integer
    The number of I/O operations per second (IOPS) that the volume supports.
  • compute.instanceGroups.{GROUP}.ebsConfiguration.ebsConfigs.VolumeSpecification.SizeInGB * Integer
    The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10 (Required if ebsConfigs is defined).
  • compute.instanceWeights Array<Object>
    Settings for custom weights
  • compute.instanceWeights.instanceType * String
    Required on compute.instanceWeights object. set relevant instance type to set weight for
  • compute.instanceWeights.weightedCapacity * Integer
    Required on compute.instanceWeights object. set weight for chosen instance type
  • compute.emrManagedMasterSecurityGroup String
    Emr Managed Security group that will be set to the master instance group
  • compute.emrManagedSlaveSecurityGroup String
    Emr Managed Security group that will be set to the slave instance group
  • compute.serviceAccessSecurityGroup String
    The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets
  • compute.additionalMasterSecurityGroups Array<String>
    A list of additional Amazon EC2 security group IDs for the master node.
  • compute.additionalSlaveSecurityGroups Array<String>
    A list of additional Amazon EC2 security group IDs for the core and task nodes.
  • compute.customAmiId String
    The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.
  • compute.repoUpgradeOnBoot String
    Applies only when CustomAmiID is used. Specifies the type of updates that are applied from the Amazon Linux AMI package repositories when an instance boots using the AMI. Possible values include: "SECURITY", "NONE"
  • compute.tags.tagKey String
    Tag Key
  • compute.tags.tagValue String
    Tag Value
  • compute.ec2KeyName String
    The name of an Amazon EC2 key pair that can be used to ssh to the master node.
  • compute.applications Array<Object>
    A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster
  • compute.applications.name String
    application name
  • compute.applications.args Array<String>
    application args
  • compute.applications.version String
    application version
  • compute.configurations Object
    Information about the configurations file that will be used in the EMR cluster. for more information please see: https://api.spotinst.com/elastigroup-for-aws/services-integrations/elastic-mapreduce/import-an-emr-cluster/advanced/
  • compute.configurations.file * Object
    Location and name of the configurations file that will be used in the EMR cluster.
  • compute.configurations.file.bucket * String
    The S3 bucket where the file is stored.
  • compute.configurations.file.key * String
    The key of the file.
  • cluster Object
    Only allowed for the new strategy
  • cluster.logUri String
    The path to the Amazon S3 location where logs for this cluster are stored
  • cluster.additionalInfo String
    This is meta information about third-party applications that third-party vendors use for testing purposes.
  • cluster.jobFlowRole String
    The IAM role that was specified when the job flow was launched. The EC2 instances of the job flow assume this role.
  • cluster.securityConfiguration String
    The name of the security configuration applied to the cluster
  • cluster.serviceRole String
    The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf
  • cluster.terminationProtected Boolean
    Specifies whether the Amazon EC2 instances in the cluster are protected from termination by API calls, user intervention, or in the event of a job-flow error
  • cluster.keepJobFlowAliveWhenNoSteps Boolean
    Specifies whether the cluster should remain available after completing all steps
  • scheduling Object
    Schedule tasks to execute on the Elastigroup.
  • scheduling.tasks Array<Object>
    An array of scheduled tasks.
  • scheduling.tasks.isEnabled Boolean
    Enable/Disable the specified scheduling task.
    Default: true
  • scheduling.tasks.instanceGroupType String
    Select the EMR instance groups to execute the scheduled task on.
    Valid Values: "task"
  • scheduling.tasks.taskType String
    The type of task to be scheduled.
    Valid Values: "setCapacity"
  • scheduling.tasks.cronExpression String
    Enter a valid Cron expression.
    Example: * 8 * 10 *
  • scheduling.tasks.targetCapacity Integer
    Set a new target capacity for the Elastigroup.
  • scheduling.tasks.minCapacity Integer
    Set a new minimum capacity for the Elastigroup.
  • scheduling.tasks.maxCapacity Integer
    Set a new maximum capacity for the Elastigroup.
  • scaling.up.policyName String
    The Scaling policy name
  • scaling.up.metricName String
    The name of the metric
    Default: AppsPending
  • scaling.up.statistic String
    The metric statistics to return. Valid Values: average, sum, sampleCount, maximum, minimum
  • scaling.up.unit String
    The unit for the alarm’s associated metric. Valid Values: seconds | microseconds | milliseconds | bytes | kilobytes | megabytes | gigabytes | terabytes | bits | kilobits | megabits | gigabits | terabits | percent | count | bytes/second | kilobytes/second | megabytes/second | gigabytes/second | terabytes/second | bits/second | kilobits/second | megabits/second | gigabits/second | terabits/second | count/second | none
  • scaling.up.threshold Double
    The value against which the specified statistic is compared.
  • scaling.up.action.type String
    The type of the action to take when scale up is needed. Valid Values: adjustment | updateCapacity | setMinTarget
  • scaling.up.action.adjustment Integer
    The number associated with the specified adjustment type. Required if using “adjustment” as action type.
  • scaling.up.action.minTargetCapacity Integer
    The number with the target capacity needed. Required if using “setMinTarget” as action type.
  • scaling.up.action.target Integer
    The desired number of instances. Optional, required if using “updateCapacity” as action type and neither “minimum” nor “maximum” are not defined.
  • scaling.up.action.minimum Integer
    The lower limit number of instances that you can scale down to. Optional, required if using “updateCapacity” as action type and neither “target” nor “maximum” are not defined.
  • scaling.up.action.maximum Integer
    The upper limit number of instances that you can scale up to. Required if using “updateCapacity” as action type and neither “target” nor “minimum” are not defined.
  • scaling.up.namespace String
    The namespace for the alarm’s associated metric.
    Default: AWS/ElasticMapReduce
  • scaling.up.dimensions Array<String>
    The dimensions for the alarm’s associated metric.
  • scaling.up.period Integer
    The period in seconds over which the statistic is applied.
  • scaling.up.evaluationPeriods Integer
    The number of periods over which data is compared to the specified threshold.
  • scaling.up.cooldown Integer
    The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start.
  • scaling.up.operator String
    The operator to use in order to determine if the scaling policy is applicable. Valid values: gt | gte | lt | lte
  • scaling.down.policyName String
    The scaling policy name
  • scaling.down.metricName String
    The name of the metric.
    Default: AppsPending
  • scaling.down.statistic String
    The metric statistics to return. Valid Values: average | sum | sampleCount | maximum | minimum
  • scaling.down.unit String
    The unit for the alarm’s associated metric. Valid Values: seconds | microseconds | milliseconds | bytes | kilobytes | megabytes | gigabytes | terabytes | bits | kilobits | megabits | gigabits | terabits | percent | count | bytes/second | kilobytes/second | megabytes/second | gigabytes/second | terabytes/second | bits/second | kilobits/second | megabits/second | gigabits/second | terabits/second | count/second | none
  • scaling.down.action Object
    The action to take when scale down is needed.
  • scaling.down.action.type String
    he type of the action to take when scale down is needed. Valid Values: adjustment | updateCapacity | setMaxTarget
  • scaling.down.action.adjustment Integer
    The number associated with the specified adjustment type. Required if using “adjustment” as action type.
  • scaling.down.action.maxTargetCapacity Integer
    The number with the target capacity needed. Required if using “setMaxTarget” as action type.
  • scaling.down.action.target Integer
    The desired number of instances. Optional, required if using “updateCapacity” as action type and neither “minimum” nor “maximum” are not defined.
  • scaling.down.action.minimum Integer
    The lower limit number of instances that you can scale down to. Required if using “updateCapacity” as action type and neither “target” nor “maximum” are not defined.
  • scaling.down.action.maximum Integer
    The upper limit number of instances that you can scale up to. Required if using “updateCapacity” as action type and neither “target” nor “minimum” are not defined.
  • scaling.down.threshold Double
    The value against which the specified statistic is compared.
  • scaling.down.namespace String
    The namespace for the alarm’s associated metric.
    Default: AWS/ElasticMapReduce
  • scaling.down.dimensions Array<Object>
    The dimensions for the alarm’s associated metric
  • scaling.down.period Integer
    The period in seconds over which the statistic is applied.
  • scaling.down.evaluationPeriods Integer
    The number of periods over which data is compared to the specified threshold
  • scaling.down.cooldown Integer
    The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start
  • scaling.down.operator String
    The operator to use in order to determine if the scaling policy is applicable. Valid values: gt | gte | lt | lte
  • steps Object
    Steps from S3
  • steps.file Object
    File path for S3
  • steps.file.bucket String
    S3 Bucket path for steps
  • steps.file.key String
    S3 key for steps
Response - 200

Headers
{
  "Content-Type": "application/json"
}
Body
Copied!
Downloaded!
{
  "request": {
    "id": "24b3159e-e2d9-49bc-bfe2-cc383febd04d",
    "url": "/aws/emr/mrScaler",
    "method": "POST",
    "timestamp": "2016-03-03T19:13:24.062Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    },
    "kind": "spotinst:aws:emr:mrScaler",
    "items": [
      {
        "id": "simrs-12345",
        "name": "my MRScaler",
        "description": "Spotinst MRScaler",
        "region": "us-west-2",
        "strategy": {
          "cloning": {
            "originClusterId": "j-38EE27G2QY02I"
          }
        },
        "compute": {
          "availabilityZones": [
            {
              "name": "us-west-2a",
              "subnetId": "subnet-3b5b3601"
            },
            {
              "name": "us-west-2b",
              "subnetId": "subnet-6b5c4209"
            }
          ],
          "instanceGroups": {
            "masterGroup": {
              "instanceTypes": [
                "m3.xlarge",
                "m4.large",
                "m4.xlarge",
                "m4.2xlarge"
              ],
              "target": 1,
              "lifeCycle": "ON_DEMAND"
            },
            "coreGroup": {
              "instanceTypes": [
                "m3.xlarge",
                "m4.large",
                "m4.xlarge",
                "m4.2xlarge"
              ],
              "target": 5,
              "lifeCycle": "SPOT"
            },
            "taskGroup": {
              "instanceTypes": [
                "m1.medium",
                "c3.xlarge",
                "m3.xlarge"
              ],
              "capacity": {
                "minimum": 0,
                "maximum": 30,
                "target": 15
              },
              "lifeCycle": "SPOT"
            }
          },
          "configurations": {
            "file": {
              "bucket": "spotinst-labs",
              "key": "emr_configurations.json"
            }
          }
        },
        "scheduling": {
          "tasks": [
            {
              "isEnabled": true,
              "instanceGroupType": "task",
              "taskType": "setCapacity",
              "cronExpression": "* 8 * 10 *",
              "targetCapacity": 2,
              "minCapacity": 2,
              "maxCapacity": 2
            }
          ]
       	},
        "scaling": {
          "up": [
            {
              "metricName": "AppsPending",
              "statistic": "average",
              "unit": "count",
              "threshold": 100,
              "minTargetCapacity": 20,
              "namespace": "AWS/ElasticMapReduce",
              "period": 300,
              "evaluationPeriods": 1,
              "cooldown": 600,
              "dimensions": [
                {
                  "name": "JobFlowId"
                }
              ],
              "operator": "gte"
            }
          ],
          "down": [
            {
              "metricName": "AppsPending",
              "statistic": "average",
              "unit": "count",
              "threshold": 10,
              "maxTargetCapacity": 5,
              "namespace": "AWS/ElasticMapReduce",
              "period": 300,
              "evaluationPeriods": 1,
              "cooldown": 600,
              "dimensions": [
                {
                  "name": "JobFlowId"
                }
              ],
              "operator": "lte"
            }
          ]
        }
      }
    ],
    "count": 1
  }
}