Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . emr ]

add-instance-groups

Description

Adds an instance group to a running cluster.

See 'aws help' for descriptions of global parameters.

Synopsis

  add-instance-groups
--cluster-id <value>
--instance-groups <value> [<value>...]

Options

--cluster-id (string)

A unique string that identifies a cluster. The create-cluster command returns this identifier. You can use the list-clusters command to get cluster IDs.

--instance-groups (list)

Specifies the number and type of Amazon EC2 instances to create for each node type in a cluster, using uniform instance groups. You can specify either --instance-groups or --instance-fleets but not both. For more information, see Create a Cluster with Instance Fleets or Instance Groups (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html).

You can configure instance group parameters in a JSON file that is stored locally or in Amazon S3 and then reference the JSON file as the sole parameter, for example, --instance-groups s3://mybucket/instancegroupconfig.json . Alternatively, you can specify arguments individually using multiple InstanceGroupType argument blocks, one for the MASTER instance group, one for a CORE instance group, and optional, multiple TASK instance groups.

If you specify inline JSON structures, enclose the entire InstanceGroupType argument block in single quotation marks.

Each InstanceGroupType block takes the following inline arguments. Optional arguments are shown in [square brackets].

  • [Name] - An optional friendly name for the instance group.
  • InstanceGroupType - MASTER , CORE , or TASK .
  • InstanceType - The type of EC2 instance, for example m3.xlarge , to use for all nodes in the instance group.
  • InstanceCount - The number of EC2 instances to provision in the instance group.
  • [BidPrice] - If specified, indicates that the instance group uses Spot Instances, and establishes the bid price for the instances.
  • [EbsConfiguration] - Specifies additional Amazon EBS storage volumes attached to EC2 instances using an inline JSON structure.
  • [AutoScalingPolicy] - Specifies an automatic scaling policy for the instance group using an inline JSON structure.

JSON Syntax:

[
  {
    "InstanceCount": integer,
    "Name": "string",
    "InstanceGroupType": "MASTER"|"CORE"|"TASK",
    "AutoScalingPolicy": {
      "Rules": [
        {
          "Action": {
            "SimpleScalingPolicyConfiguration": {
              "ScalingAdjustment": integer,
              "CoolDown": integer,
              "AdjustmentType": "CHANGE_IN_CAPACITY"|"PERCENT_CHANGE_IN_CAPACITY"|"EXACT_CAPACITY"
            },
            "Market": "ON_DEMAND"|"SPOT"
          },
          "Trigger": {
            "CloudWatchAlarmDefinition": {
              "EvaluationPeriods": integer,
              "Dimensions": [
                {
                  "Key": "string",
                  "Value": "string"
                }
                ...
              ],
              "Namespace": "string",
              "Period": integer,
              "ComparisonOperator": "string",
              "Statistic": "string",
              "Threshold": double,
              "Unit": "string",
              "MetricName": "string"
            }
          },
          "Name": "string",
          "Description": "string"
        }
        ...
      ],
      "Constraints": {
        "MinCapacity": integer,
        "MaxCapacity": integer
      }
    },
    "EbsConfiguration": {
      "EbsOptimized": true|false,
      "EbsBlockDeviceConfigs": [
        {
          "VolumeSpecification": {
            "Iops": integer,
            "VolumeType": "string",
            "SizeInGB": integer
          },
          "VolumesPerInstance": integer
        }
        ...
      ]
    },
    "BidPrice": "string",
    "InstanceType": "string"
  }
  ...
]

See 'aws help' for descriptions of global parameters.