Class: AWS.EMR

Inherits:
AWS.Service show all
Identifier:
emr
API Version:
2009-03-31
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon EMR is a web service that makes it easy to process large amounts of data efficiently. Amazon EMR uses Hadoop processing combined with several AWS products to do tasks such as web indexing, data mining, log file analysis, machine learning, scientific simulation, and data warehousing.

Sending a Request Using EMR

var emr = new AWS.EMR();
emr.addInstanceFleet(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the EMR object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var emr = new AWS.EMR({apiVersion: '2009-03-31'});

You can also set the API version globally in AWS.config.apiVersions using the emr service identifier:

AWS.config.apiVersions = {
  emr: '2009-03-31',
  // other service API versions
};

var emr = new AWS.EMR();

Version:

  • 2009-03-31

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

clusterRunning, stepComplete, clusterTerminated

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.EMR(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a EMR object

var emr = new AWS.EMR({apiVersion: '2009-03-31'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.EMR.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.EMR.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.EMR.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

addInstanceFleet(params = {}, callback) ⇒ AWS.Request

Adds an instance fleet to a running cluster.

Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x.

Service Reference:

Examples:

Calling the addInstanceFleet operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  InstanceFleet: { /* required */
    InstanceFleetType: MASTER | CORE | TASK, /* required */
    InstanceTypeConfigs: [
      {
        InstanceType: 'STRING_VALUE', /* required */
        BidPrice: 'STRING_VALUE',
        BidPriceAsPercentageOfOnDemandPrice: 'NUMBER_VALUE',
        Configurations: [ /* ConfigurationList */
          {
            Classification: 'STRING_VALUE',
            Configurations: /* recursive ConfigurationList */,
            Properties: {
              '<String>': 'STRING_VALUE',
              /* '<String>': ... */
            }
          },
          /* more items */
        ],
        EbsConfiguration: {
          EbsBlockDeviceConfigs: [
            {
              VolumeSpecification: { /* required */
                SizeInGB: 'NUMBER_VALUE', /* required */
                VolumeType: 'STRING_VALUE', /* required */
                Iops: 'NUMBER_VALUE'
              },
              VolumesPerInstance: 'NUMBER_VALUE'
            },
            /* more items */
          ],
          EbsOptimized: true || false
        },
        WeightedCapacity: 'NUMBER_VALUE'
      },
      /* more items */
    ],
    LaunchSpecifications: {
      SpotSpecification: { /* required */
        TimeoutAction: SWITCH_TO_ON_DEMAND | TERMINATE_CLUSTER, /* required */
        TimeoutDurationMinutes: 'NUMBER_VALUE', /* required */
        BlockDurationMinutes: 'NUMBER_VALUE'
      }
    },
    Name: 'STRING_VALUE',
    TargetOnDemandCapacity: 'NUMBER_VALUE',
    TargetSpotCapacity: 'NUMBER_VALUE'
  }
};
emr.addInstanceFleet(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The unique identifier of the cluster.

    • InstanceFleet — (map)

      Specifies the configuration of the instance fleet.

      • Name — (String)

        The friendly name of the instance fleet.

      • InstanceFleetTyperequired — (String)

        The node type that the instance fleet hosts. Valid values are MASTER,CORE,and TASK.

        Possible values include:
        • "MASTER"
        • "CORE"
        • "TASK"
      • TargetOnDemandCapacity — (Integer)

        The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When an On-Demand instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.

        Note: If not specified or set to 0, only Spot instances are provisioned for the instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
      • TargetSpotCapacity — (Integer)

        The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.

        Note: If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
      • InstanceTypeConfigs — (Array<map>)

        The instance type configurations that define the EC2 instances in the instance fleet.

        • InstanceTyperequired — (String)

          An EC2 instance type, such as m3.xlarge.

        • WeightedCapacity — (Integer)

          The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified.

        • BidPrice — (String)

          The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.

        • BidPriceAsPercentageOfOnDemandPrice — (Float)

          The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType. Expressed as a number (for example, 20 specifies 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.

        • EbsConfiguration — (map)

          The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType.

          • EbsBlockDeviceConfigs — (Array<map>)

            An array of Amazon EBS volume specifications attached to a cluster instance.

            • VolumeSpecificationrequired — (map)

              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.

              • VolumeTyperequired — (String)

                The volume type. Volume types supported are gp2, io1, standard.

              • Iops — (Integer)

                The number of I/O operations per second (IOPS) that the volume supports.

              • SizeInGBrequired — (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.

            • VolumesPerInstance — (Integer)

              Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group

          • EbsOptimized — (Boolean)

            Indicates whether an Amazon EBS volume is EBS-optimized.

        • Configurations — (Array<map>)

          A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.

          • Classification — (String)

            The classification within a configuration.

          • Properties — (map<String>)

            A set of properties specified within a configuration classification.

      • LaunchSpecifications — (map)

        The launch specification for the instance fleet.

        • SpotSpecificationrequired — (map)

          The launch specification for Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior.

          • TimeoutDurationMinutesrequired — (Integer)

            The spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

          • TimeoutActionrequired — (String)

            The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

            Possible values include:
            • "SWITCH_TO_ON_DEMAND"
            • "TERMINATE_CLUSTER"
          • BlockDurationMinutes — (Integer)

            The defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ClusterId — (String)

        The unique identifier of the cluster.

      • InstanceFleetId — (String)

        The unique identifier of the instance fleet.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

addInstanceGroups(params = {}, callback) ⇒ AWS.Request

Adds one or more instance groups to a running cluster.

Service Reference:

Examples:

Calling the addInstanceGroups operation

var params = {
  InstanceGroups: [ /* required */
    {
      InstanceCount: 'NUMBER_VALUE', /* required */
      InstanceRole: MASTER | CORE | TASK, /* required */
      InstanceType: 'STRING_VALUE', /* required */
      AutoScalingPolicy: {
        Constraints: { /* required */
          MaxCapacity: 'NUMBER_VALUE', /* required */
          MinCapacity: 'NUMBER_VALUE' /* required */
        },
        Rules: [ /* required */
          {
            Action: { /* required */
              SimpleScalingPolicyConfiguration: { /* required */
                ScalingAdjustment: 'NUMBER_VALUE', /* required */
                AdjustmentType: CHANGE_IN_CAPACITY | PERCENT_CHANGE_IN_CAPACITY | EXACT_CAPACITY,
                CoolDown: 'NUMBER_VALUE'
              },
              Market: ON_DEMAND | SPOT
            },
            Name: 'STRING_VALUE', /* required */
            Trigger: { /* required */
              CloudWatchAlarmDefinition: { /* required */
                ComparisonOperator: GREATER_THAN_OR_EQUAL | GREATER_THAN | LESS_THAN | LESS_THAN_OR_EQUAL, /* required */
                MetricName: 'STRING_VALUE', /* required */
                Period: 'NUMBER_VALUE', /* required */
                Threshold: 'NUMBER_VALUE', /* required */
                Dimensions: [
                  {
                    Key: 'STRING_VALUE',
                    Value: 'STRING_VALUE'
                  },
                  /* more items */
                ],
                EvaluationPeriods: 'NUMBER_VALUE',
                Namespace: 'STRING_VALUE',
                Statistic: SAMPLE_COUNT | AVERAGE | SUM | MINIMUM | MAXIMUM,
                Unit: NONE | SECONDS | MICRO_SECONDS | MILLI_SECONDS | BYTES | KILO_BYTES | MEGA_BYTES | GIGA_BYTES | TERA_BYTES | BITS | KILO_BITS | MEGA_BITS | GIGA_BITS | TERA_BITS | PERCENT | COUNT | BYTES_PER_SECOND | KILO_BYTES_PER_SECOND | MEGA_BYTES_PER_SECOND | GIGA_BYTES_PER_SECOND | TERA_BYTES_PER_SECOND | BITS_PER_SECOND | KILO_BITS_PER_SECOND | MEGA_BITS_PER_SECOND | GIGA_BITS_PER_SECOND | TERA_BITS_PER_SECOND | COUNT_PER_SECOND
              }
            },
            Description: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      BidPrice: 'STRING_VALUE',
      Configurations: [ /* ConfigurationList */
        {
          Classification: 'STRING_VALUE',
          Configurations: /* recursive ConfigurationList */,
          Properties: {
            '<String>': 'STRING_VALUE',
            /* '<String>': ... */
          }
        },
        /* more items */
      ],
      EbsConfiguration: {
        EbsBlockDeviceConfigs: [
          {
            VolumeSpecification: { /* required */
              SizeInGB: 'NUMBER_VALUE', /* required */
              VolumeType: 'STRING_VALUE', /* required */
              Iops: 'NUMBER_VALUE'
            },
            VolumesPerInstance: 'NUMBER_VALUE'
          },
          /* more items */
        ],
        EbsOptimized: true || false
      },
      Market: ON_DEMAND | SPOT,
      Name: 'STRING_VALUE'
    },
    /* more items */
  ],
  JobFlowId: 'STRING_VALUE' /* required */
};
emr.addInstanceGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InstanceGroups — (Array<map>)

      Instance groups to add.

      • Name — (String)

        Friendly name given to the instance group.

      • Market — (String)

        Market type of the EC2 instances used to create a cluster node.

        Possible values include:
        • "ON_DEMAND"
        • "SPOT"
      • InstanceRolerequired — (String)

        The role of the instance group in the cluster.

        Possible values include:
        • "MASTER"
        • "CORE"
        • "TASK"
      • BidPrice — (String)

        The maximum Spot price your are willing to pay for EC2 instances.

        An optional, nullable field that applies if the MarketType for the instance group is specified as SPOT. Specify the maximum spot price in USD. If the value is NULL and SPOT is specified, the maximum Spot price is set equal to the On-Demand price.

      • InstanceTyperequired — (String)

        The EC2 instance type for all instances in the instance group.

      • InstanceCountrequired — (Integer)

        Target number of instances for the instance group.

      • Configurations — (Array<map>)
        Note: Amazon EMR releases 4.x or later.

        The list of configurations supplied for an EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).

        • Classification — (String)

          The classification within a configuration.

        • Properties — (map<String>)

          A set of properties specified within a configuration classification.

      • EbsConfiguration — (map)

        EBS configurations that will be attached to each EC2 instance in the instance group.

        • EbsBlockDeviceConfigs — (Array<map>)

          An array of Amazon EBS volume specifications attached to a cluster instance.

          • VolumeSpecificationrequired — (map)

            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.

            • VolumeTyperequired — (String)

              The volume type. Volume types supported are gp2, io1, standard.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS) that the volume supports.

            • SizeInGBrequired — (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.

          • VolumesPerInstance — (Integer)

            Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group

        • EbsOptimized — (Boolean)

          Indicates whether an Amazon EBS volume is EBS-optimized.

      • AutoScalingPolicy — (map)

        An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. See PutAutoScalingPolicy.

        • Constraintsrequired — (map)

          The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.

          • MinCapacityrequired — (Integer)

            The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.

          • MaxCapacityrequired — (Integer)

            The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary.

        • Rulesrequired — (Array<map>)

          The scale-in and scale-out rules that comprise the automatic scaling policy.

          • Namerequired — (String)

            The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy.

          • Description — (String)

            A friendly, more verbose description of the automatic scaling rule.

          • Actionrequired — (map)

            The conditions that trigger an automatic scaling activity.

            • Market — (String)

              Not available for instance groups. Instance groups use the market type specified for the group.

              Possible values include:
              • "ON_DEMAND"
              • "SPOT"
            • SimpleScalingPolicyConfigurationrequired — (map)

              The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.

              • AdjustmentType — (String)

                The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of EC2 instances specified by ScalingAdjustment, which should be expressed as a positive integer.

                Possible values include:
                • "CHANGE_IN_CAPACITY"
                • "PERCENT_CHANGE_IN_CAPACITY"
                • "EXACT_CAPACITY"
              • ScalingAdjustmentrequired — (Integer)

                The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.

              • CoolDown — (Integer)

                The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.

          • Triggerrequired — (map)

            The CloudWatch alarm definition that determines when automatic scaling activity is triggered.

            • CloudWatchAlarmDefinitionrequired — (map)

              The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.

              • ComparisonOperatorrequired — (String)

                Determines how the metric specified by MetricName is compared to the value specified by Threshold.

                Possible values include:
                • "GREATER_THAN_OR_EQUAL"
                • "GREATER_THAN"
                • "LESS_THAN"
                • "LESS_THAN_OR_EQUAL"
              • EvaluationPeriods — (Integer)

                The number of periods, expressed in seconds using Period, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.

              • MetricNamerequired — (String)

                The name of the CloudWatch metric that is watched to determine an alarm condition.

              • Namespace — (String)

                The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.

              • Periodrequired — (Integer)

                The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.

              • Statistic — (String)

                The statistic to apply to the metric associated with the alarm. The default is AVERAGE.

                Possible values include:
                • "SAMPLE_COUNT"
                • "AVERAGE"
                • "SUM"
                • "MINIMUM"
                • "MAXIMUM"
              • Thresholdrequired — (Float)

                The value against which the specified statistic is compared.

              • Unit — (String)

                The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.

                Possible values include:
                • "NONE"
                • "SECONDS"
                • "MICRO_SECONDS"
                • "MILLI_SECONDS"
                • "BYTES"
                • "KILO_BYTES"
                • "MEGA_BYTES"
                • "GIGA_BYTES"
                • "TERA_BYTES"
                • "BITS"
                • "KILO_BITS"
                • "MEGA_BITS"
                • "GIGA_BITS"
                • "TERA_BITS"
                • "PERCENT"
                • "COUNT"
                • "BYTES_PER_SECOND"
                • "KILO_BYTES_PER_SECOND"
                • "MEGA_BYTES_PER_SECOND"
                • "GIGA_BYTES_PER_SECOND"
                • "TERA_BYTES_PER_SECOND"
                • "BITS_PER_SECOND"
                • "KILO_BITS_PER_SECOND"
                • "MEGA_BITS_PER_SECOND"
                • "GIGA_BITS_PER_SECOND"
                • "TERA_BITS_PER_SECOND"
                • "COUNT_PER_SECOND"
              • Dimensions — (Array<map>)

                A CloudWatch metric dimension.

                • Key — (String)

                  The dimension name.

                • Value — (String)

                  The dimension value.

    • JobFlowId — (String)

      Job flow in which to add the instance groups.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • JobFlowId — (String)

        The job flow ID in which the instance groups are added.

      • InstanceGroupIds — (Array<String>)

        Instance group IDs of the newly created instance groups.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

addJobFlowSteps(params = {}, callback) ⇒ AWS.Request

AddJobFlowSteps adds new steps to a running cluster. A maximum of 256 steps are allowed in each job flow.

If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using SSH to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, see Add More than 256 Steps to a Cluster in the Amazon EMR Management Guide.

A step specifies the location of a JAR file stored either on the master node of the cluster or in Amazon S3. Each step is performed by the main function of the main class of the JAR file. The main class can be specified either in the manifest of the JAR or by using the MainFunction parameter of the step.

Amazon EMR executes each step in the order listed. For a step to be considered complete, the main function must exit with a zero exit code and all Hadoop jobs started while the step was running must have completed and run successfully.

You can only add steps to a cluster that is in one of the following states: STARTING, BOOTSTRAPPING, RUNNING, or WAITING.

Service Reference:

Examples:

Calling the addJobFlowSteps operation

var params = {
  JobFlowId: 'STRING_VALUE', /* required */
  Steps: [ /* required */
    {
      HadoopJarStep: { /* required */
        Jar: 'STRING_VALUE', /* required */
        Args: [
          'STRING_VALUE',
          /* more items */
        ],
        MainClass: 'STRING_VALUE',
        Properties: [
          {
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      Name: 'STRING_VALUE', /* required */
      ActionOnFailure: TERMINATE_JOB_FLOW | TERMINATE_CLUSTER | CANCEL_AND_WAIT | CONTINUE
    },
    /* more items */
  ]
};
emr.addJobFlowSteps(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • JobFlowId — (String)

      A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from ListClusters.

    • Steps — (Array<map>)

      A list of StepConfig to be executed by the job flow.

      • Namerequired — (String)

        The name of the step.

      • ActionOnFailure — (String)

        The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.

        Possible values include:
        • "TERMINATE_JOB_FLOW"
        • "TERMINATE_CLUSTER"
        • "CANCEL_AND_WAIT"
        • "CONTINUE"
      • HadoopJarSteprequired — (map)

        The JAR file used for the step.

        • Properties — (Array<map>)

          A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

          • Key — (String)

            The unique identifier of a key value pair.

          • Value — (String)

            The value part of the identified key.

        • Jarrequired — (String)

          A path to a JAR file run during the step.

        • MainClass — (String)

          The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

        • Args — (Array<String>)

          A list of command line arguments passed to the JAR file's main function when executed.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • StepIds — (Array<String>)

        The identifiers of the list of steps added to the job flow.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

addTags(params = {}, callback) ⇒ AWS.Request

Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.

Service Reference:

Examples:

Calling the addTags operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
emr.addTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceId — (String)

      The Amazon EMR resource identifier to which tags will be added. This value must be a cluster identifier.

    • Tags — (Array<map>)

      A list of tags to associate with a cluster and propagate to EC2 instances. Tags are user-defined key/value pairs that consist of a required key string with a maximum of 128 characters, and an optional value string with a maximum of 256 characters.

      • Key — (String)

        A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag .

      • Value — (String)

        A user-defined value, which is optional in a tag. For more information, see Tag Clusters.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

cancelSteps(params = {}, callback) ⇒ AWS.Request

Cancels a pending step or steps in a running cluster. Available only in Amazon EMR versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed in each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not guarantee a step will be canceled, even if the request is successfully submitted. You can only cancel steps that are in a PENDING state.

Service Reference:

Examples:

Calling the cancelSteps operation

var params = {
  ClusterId: 'STRING_VALUE',
  StepIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
emr.cancelSteps(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The ClusterID for which specified steps will be canceled. Use RunJobFlow and ListClusters to get ClusterIDs.

    • StepIds — (Array<String>)

      The list of StepIDs to cancel. Use ListSteps to get steps and their states for the specified cluster.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CancelStepsInfoList — (Array<map>)

        A list of CancelStepsInfo, which shows the status of specified cancel requests for each StepID specified.

        • StepId — (String)

          The encrypted StepId of a step.

        • Status — (String)

          The status of a CancelSteps Request. The value may be SUBMITTED or FAILED.

          Possible values include:
          • "SUBMITTED"
          • "FAILED"
        • Reason — (String)

          The reason for the failure if the CancelSteps request fails.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSecurityConfiguration(params = {}, callback) ⇒ AWS.Request

Creates a security configuration, which is stored in the service and can be specified when a cluster is created.

Service Reference:

Examples:

Calling the createSecurityConfiguration operation

var params = {
  Name: 'STRING_VALUE', /* required */
  SecurityConfiguration: 'STRING_VALUE' /* required */
};
emr.createSecurityConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the security configuration.

    • SecurityConfiguration — (String)

      The security configuration details in JSON format. For JSON parameters and examples, see Use Security Configurations to Set Up Cluster Security in the Amazon EMR Management Guide.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

        The name of the security configuration.

      • CreationDateTime — (Date)

        The date and time the security configuration was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSecurityConfiguration(params = {}, callback) ⇒ AWS.Request

Deletes a security configuration.

Service Reference:

Examples:

Calling the deleteSecurityConfiguration operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
emr.deleteSecurityConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the security configuration.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeCluster(params = {}, callback) ⇒ AWS.Request

Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on.

Service Reference:

Examples:

Calling the describeCluster operation

var params = {
  ClusterId: 'STRING_VALUE' /* required */
};
emr.describeCluster(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The identifier of the cluster to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Cluster — (map)

        This output contains the details for the requested cluster.

        • Id — (String)

          The unique identifier for the cluster.

        • Name — (String)

          The name of the cluster.

        • Status — (map)

          The current status details about the cluster.

          • State — (String)

            The current state of the cluster.

            Possible values include:
            • "STARTING"
            • "BOOTSTRAPPING"
            • "RUNNING"
            • "WAITING"
            • "TERMINATING"
            • "TERMINATED"
            • "TERMINATED_WITH_ERRORS"
          • StateChangeReason — (map)

            The reason for the cluster status change.

            • Code — (String)

              The programmatic code for the state change reason.

              Possible values include:
              • "INTERNAL_ERROR"
              • "VALIDATION_ERROR"
              • "INSTANCE_FAILURE"
              • "INSTANCE_FLEET_TIMEOUT"
              • "BOOTSTRAP_FAILURE"
              • "USER_REQUEST"
              • "STEP_FAILURE"
              • "ALL_STEPS_COMPLETED"
            • Message — (String)

              The descriptive message for the state change reason.

          • Timeline — (map)

            A timeline that represents the status of a cluster over the lifetime of the cluster.

            • CreationDateTime — (Date)

              The creation date and time of the cluster.

            • ReadyDateTime — (Date)

              The date and time when the cluster was ready to execute steps.

            • EndDateTime — (Date)

              The date and time when the cluster was terminated.

        • Ec2InstanceAttributes — (map)

          Provides information about the EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.

          • Ec2KeyName — (String)

            The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".

          • Ec2SubnetId — (String)

            To launch the cluster in Amazon VPC, set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, the cluster is launched in the normal AWS cloud, outside of a VPC.

            Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus, you cannot specify the cc1.4xlarge instance type for nodes of a cluster launched in a VPC.

          • RequestedEc2SubnetIds — (Array<String>)

            Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more Amazon EC2 subnets in which to launch EC2 cluster instances. Subnets must exist within the same VPC. Amazon EMR chooses the EC2 subnet with the best fit from among the list of RequestedEc2SubnetIds, and then launches all cluster instances within that Subnet. If this value is not specified, and the account and region support EC2-Classic networks, the cluster launches instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones instead of this setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.

          • Ec2AvailabilityZone — (String)

            The Availability Zone in which the cluster will run.

          • RequestedEc2AvailabilityZones — (Array<String>)

            Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which to launch EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones, and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.

          • IamInstanceProfile — (String)

            The IAM role that was specified when the cluster was launched. The EC2 instances of the cluster assume this role.

          • EmrManagedMasterSecurityGroup — (String)

            The identifier of the Amazon EC2 security group for the master node.

          • EmrManagedSlaveSecurityGroup — (String)

            The identifier of the Amazon EC2 security group for the core and task nodes.

          • ServiceAccessSecurityGroup — (String)

            The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.

          • AdditionalMasterSecurityGroups — (Array<String>)

            A list of additional Amazon EC2 security group IDs for the master node.

          • AdditionalSlaveSecurityGroups — (Array<String>)

            A list of additional Amazon EC2 security group IDs for the core and task nodes.

        • InstanceCollectionType — (String)
          Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

          The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a uniform instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets configuration.

          Possible values include:
          • "INSTANCE_FLEET"
          • "INSTANCE_GROUP"
        • LogUri — (String)

          The path to the Amazon S3 location where logs for this cluster are stored.

        • RequestedAmiVersion — (String)

          The AMI version requested for this cluster.

        • RunningAmiVersion — (String)

          The AMI version running on this cluster.

        • ReleaseLabel — (String)

          The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, emr-5.14.0. For more information about Amazon EMR release versions and included application versions and features, see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR releases versions 4.x and later. Earlier versions use AmiVersion.

        • AutoTerminate — (Boolean)

          Specifies whether the cluster should terminate after completing all steps.

        • TerminationProtected — (Boolean)

          Indicates whether Amazon EMR will lock the cluster to prevent the EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.

        • VisibleToAllUsers — (Boolean)

          Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set to true, all IAM users of that AWS account can view and manage the cluster if they have the proper policy permissions set. If this value is false, only the IAM user that created the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers action.

        • Applications — (Array<map>)

          The applications installed on this cluster.

          • Name — (String)

            The name of the application.

          • Version — (String)

            The version of the application.

          • Args — (Array<String>)

            Arguments for Amazon EMR to pass to the application.

          • AdditionalInfo — (map<String>)

            This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purposes.

        • Tags — (Array<map>)

          A list of tags associated with a cluster.

          • Key — (String)

            A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag .

          • Value — (String)

            A user-defined value, which is optional in a tag. For more information, see Tag Clusters.

        • ServiceRole — (String)

          The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.

        • NormalizedInstanceHours — (Integer)

          An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.

        • MasterPublicDnsName — (String)

          The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

        • Configurations — (Array<map>)

          Applies only to Amazon EMR releases 4.x and later. The list of Configurations supplied to the EMR cluster.

          • Classification — (String)

            The classification within a configuration.

          • Properties — (map<String>)

            A set of properties specified within a configuration classification.

        • SecurityConfiguration — (String)

          The name of the security configuration applied to the cluster.

        • AutoScalingRole — (String)

          An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

        • ScaleDownBehavior — (String)

          The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR blacklists and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.

          Possible values include:
          • "TERMINATE_AT_INSTANCE_HOUR"
          • "TERMINATE_AT_TASK_COMPLETION"
        • CustomAmiId — (String)

          Available only in Amazon EMR version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.

        • EbsRootVolumeSize — (Integer)

          The size, in GiB, of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

        • 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"
        • KerberosAttributes — (map)

          Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see Use Kerberos Authentication in the EMR Management Guide.

          • Realmrequired — (String)

            The name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL.

          • KdcAdminPasswordrequired — (String)

            The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster.

          • CrossRealmTrustPrincipalPassword — (String)

            Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms.

          • ADDomainJoinUser — (String)

            Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain.

          • ADDomainJoinPassword — (String)

            The Active Directory password for ADDomainJoinUser.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

describeJobFlows(params = {}, callback) ⇒ AWS.Request

This API is deprecated and will eventually be removed. We recommend you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.

DescribeJobFlows returns a list of job flows that match all of the supplied parameters. The parameters can include a list of job flow IDs, job flow states, and restrictions on job flow creation date and time.

Regardless of supplied parameters, only job flows created within the last two months are returned.

If no parameters are supplied, then job flows matching either of the following criteria are returned:

  • Job flows created and completed in the last two weeks

  • Job flows created within the last two months that are in one of the following states: RUNNING, WAITING, SHUTTING_DOWN, STARTING

Amazon EMR can return a maximum of 512 job flow descriptions.

Service Reference:

Examples:

Calling the describeJobFlows operation

var params = {
  CreatedAfter: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  CreatedBefore: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  JobFlowIds: [
    'STRING_VALUE',
    /* more items */
  ],
  JobFlowStates: [
    STARTING | BOOTSTRAPPING | RUNNING | WAITING | SHUTTING_DOWN | TERMINATED | COMPLETED | FAILED,
    /* more items */
  ]
};
emr.describeJobFlows(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CreatedAfter — (Date)

      Return only job flows created after this date and time.

    • CreatedBefore — (Date)

      Return only job flows created before this date and time.

    • JobFlowIds — (Array<String>)

      Return only job flows whose job flow ID is contained in this list.

    • JobFlowStates — (Array<String>)

      Return only job flows whose state is contained in this list.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • JobFlows — (Array<map>)

        A list of job flows matching the parameters supplied.

        • JobFlowIdrequired — (String)

          The job flow identifier.

        • Namerequired — (String)

          The name of the job flow.

        • LogUri — (String)

          The location in Amazon S3 where log files for the job are stored.

        • AmiVersion — (String)

          Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID.

        • ExecutionStatusDetailrequired — (map)

          Describes the execution status of the job flow.

          • Staterequired — (String)

            The state of the job flow.

            Possible values include:
            • "STARTING"
            • "BOOTSTRAPPING"
            • "RUNNING"
            • "WAITING"
            • "SHUTTING_DOWN"
            • "TERMINATED"
            • "COMPLETED"
            • "FAILED"
          • CreationDateTimerequired — (Date)

            The creation date and time of the job flow.

          • StartDateTime — (Date)

            The start date and time of the job flow.

          • ReadyDateTime — (Date)

            The date and time when the job flow was ready to start running bootstrap actions.

          • EndDateTime — (Date)

            The completion date and time of the job flow.

          • LastStateChangeReason — (String)

            Description of the job flow last changed state.

        • Instancesrequired — (map)

          Describes the Amazon EC2 instances of the job flow.

          • MasterInstanceTyperequired — (String)

            The Amazon EC2 master node instance type.

          • MasterPublicDnsName — (String)

            The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

          • MasterInstanceId — (String)

            The Amazon EC2 instance identifier of the master node.

          • SlaveInstanceTyperequired — (String)

            The Amazon EC2 core and task node instance type.

          • InstanceCountrequired — (Integer)

            The number of Amazon EC2 instances in the cluster. If the value is 1, the same instance serves as both the master and core and task node. If the value is greater than 1, one instance is the master node and all others are core and task nodes.

          • InstanceGroups — (Array<map>)

            Details about the instance groups in a cluster.

            • InstanceGroupId — (String)

              Unique identifier for the instance group.

            • Name — (String)

              Friendly name for the instance group.

            • Marketrequired — (String)

              Market type of the EC2 instances used to create a cluster node.

              Possible values include:
              • "ON_DEMAND"
              • "SPOT"
            • InstanceRolerequired — (String)

              Instance group role in the cluster

              Possible values include:
              • "MASTER"
              • "CORE"
              • "TASK"
            • BidPrice — (String)

              The maximum Spot price your are willing to pay for EC2 instances.

              An optional, nullable field that applies if the MarketType for the instance group is specified as SPOT. Specified in USD. If the value is NULL and SPOT is specified, the maximum Spot price is set equal to the On-Demand price.

            • InstanceTyperequired — (String)

              EC2 instance type.

            • InstanceRequestCountrequired — (Integer)

              Target number of instances to run in the instance group.

            • InstanceRunningCountrequired — (Integer)

              Actual count of running instances.

            • Staterequired — (String)

              State of instance group. The following values are deprecated: STARTING, TERMINATED, and FAILED.

              Possible values include:
              • "PROVISIONING"
              • "BOOTSTRAPPING"
              • "RUNNING"
              • "RECONFIGURING"
              • "RESIZING"
              • "SUSPENDED"
              • "TERMINATING"
              • "TERMINATED"
              • "ARRESTED"
              • "SHUTTING_DOWN"
              • "ENDED"
            • LastStateChangeReason — (String)

              Details regarding the state of the instance group.

            • CreationDateTimerequired — (Date)

              The date/time the instance group was created.

            • StartDateTime — (Date)

              The date/time the instance group was started.

            • ReadyDateTime — (Date)

              The date/time the instance group was available to the cluster.

            • EndDateTime — (Date)

              The date/time the instance group was terminated.

          • NormalizedInstanceHours — (Integer)

            An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour that an m1.small runs. Larger instances are weighted more, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.

          • Ec2KeyName — (String)

            The name of an Amazon EC2 key pair that can be used to ssh to the master node.

          • Ec2SubnetId — (String)

            For clusters launched within Amazon Virtual Private Cloud, this is the identifier of the subnet where the cluster was launched.

          • Placement — (map)

            The Amazon EC2 Availability Zone for the cluster.

            • AvailabilityZone — (String)

              The Amazon EC2 Availability Zone for the cluster. AvailabilityZone is used for uniform instance groups, while AvailabilityZones (plural) is used for instance fleets.

            • AvailabilityZones — (Array<String>)

              When multiple Availability Zones are specified, Amazon EMR evaluates them and launches instances in the optimal Availability Zone. AvailabilityZones is used for instance fleets, while AvailabilityZone (singular) is used for uniform instance groups.

              Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
          • KeepJobFlowAliveWhenNoSteps — (Boolean)

            Specifies whether the cluster should remain available after completing all steps.

          • 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.

          • HadoopVersion — (String)

            The Hadoop version for the cluster.

        • Steps — (Array<map>)

          A list of steps run by the job flow.

          • StepConfigrequired — (map)

            The step configuration.

            • Namerequired — (String)

              The name of the step.

            • ActionOnFailure — (String)

              The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.

              Possible values include:
              • "TERMINATE_JOB_FLOW"
              • "TERMINATE_CLUSTER"
              • "CANCEL_AND_WAIT"
              • "CONTINUE"
            • HadoopJarSteprequired — (map)

              The JAR file used for the step.

              • Properties — (Array<map>)

                A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

                • Key — (String)

                  The unique identifier of a key value pair.

                • Value — (String)

                  The value part of the identified key.

              • Jarrequired — (String)

                A path to a JAR file run during the step.

              • MainClass — (String)

                The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

              • Args — (Array<String>)

                A list of command line arguments passed to the JAR file's main function when executed.

          • ExecutionStatusDetailrequired — (map)

            The description of the step status.

            • Staterequired — (String)

              The state of the step.

              Possible values include:
              • "PENDING"
              • "RUNNING"
              • "CONTINUE"
              • "COMPLETED"
              • "CANCELLED"
              • "FAILED"
              • "INTERRUPTED"
            • CreationDateTimerequired — (Date)

              The creation date and time of the step.

            • StartDateTime — (Date)

              The start date and time of the step.

            • EndDateTime — (Date)

              The completion date and time of the step.

            • LastStateChangeReason — (String)

              A description of the step's current state.

        • BootstrapActions — (Array<map>)

          A list of the bootstrap actions run by the job flow.

          • BootstrapActionConfig — (map)

            A description of the bootstrap action.

            • Namerequired — (String)

              The name of the bootstrap action.

            • ScriptBootstrapActionrequired — (map)

              The script run by the bootstrap action.

              • Pathrequired — (String)

                Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.

              • Args — (Array<String>)

                A list of command line arguments to pass to the bootstrap action script.

        • SupportedProducts — (Array<String>)

          A list of strings set by third party software when the job flow is launched. If you are not using third party software to manage the job flow this value is empty.

        • VisibleToAllUsers — (Boolean)

          Specifies whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the cluster. If it is set to false, only the IAM user that created the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers action.

        • JobFlowRole — (String)

          The IAM role that was specified when the job flow was launched. The EC2 instances of the job flow assume this role.

        • ServiceRole — (String)

          The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.

        • AutoScalingRole — (String)

          An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides a way for the automatic scaling feature to get the required permissions it needs to launch and terminate EC2 instances in an instance group.

        • ScaleDownBehavior — (String)

          The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR blacklists and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.

          Possible values include:
          • "TERMINATE_AT_INSTANCE_HOUR"
          • "TERMINATE_AT_TASK_COMPLETION"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSecurityConfiguration(params = {}, callback) ⇒ AWS.Request

Provides the details of a security configuration by returning the configuration JSON.

Service Reference:

Examples:

Calling the describeSecurityConfiguration operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
emr.describeSecurityConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the security configuration.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

        The name of the security configuration.

      • SecurityConfiguration — (String)

        The security configuration details in JSON format.

      • CreationDateTime — (Date)

        The date and time the security configuration was created

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeStep(params = {}, callback) ⇒ AWS.Request

Provides more detail about the cluster step.

Service Reference:

Examples:

Calling the describeStep operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  StepId: 'STRING_VALUE' /* required */
};
emr.describeStep(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The identifier of the cluster with steps to describe.

    • StepId — (String)

      The identifier of the step to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Step — (map)

        The step details for the requested step identifier.

        • Id — (String)

          The identifier of the cluster step.

        • Name — (String)

          The name of the cluster step.

        • Config — (map)

          The Hadoop job configuration of the cluster step.

          • Jar — (String)

            The path to the JAR file that runs during the step.

          • Properties — (map<String>)

            The list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

          • MainClass — (String)

            The name of the main class in the specified Java file. If not specified, the JAR file should specify a main class in its manifest file.

          • Args — (Array<String>)

            The list of command line arguments to pass to the JAR file's main function for execution.

        • ActionOnFailure — (String)

          The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.

          Possible values include:
          • "TERMINATE_JOB_FLOW"
          • "TERMINATE_CLUSTER"
          • "CANCEL_AND_WAIT"
          • "CONTINUE"
        • Status — (map)

          The current execution status details of the cluster step.

          • State — (String)

            The execution state of the cluster step.

            Possible values include:
            • "PENDING"
            • "CANCEL_PENDING"
            • "RUNNING"
            • "COMPLETED"
            • "CANCELLED"
            • "FAILED"
            • "INTERRUPTED"
          • StateChangeReason — (map)

            The reason for the step execution status change.

            • Code — (String)

              The programmable code for the state change reason. Note: Currently, the service provides no code for the state change.

              Possible values include:
              • "NONE"
            • Message — (String)

              The descriptive message for the state change reason.

          • FailureDetails — (map)

            The details for the step failure including reason, message, and log file path where the root cause was identified.

            • Reason — (String)

              The reason for the step failure. In the case where the service cannot successfully determine the root cause of the failure, it returns "Unknown Error" as a reason.

            • Message — (String)

              The descriptive message including the error the EMR service has identified as the cause of step failure. This is text from an error log that describes the root cause of the failure.

            • LogFile — (String)

              The path to the log file where the step failure root cause was originally recorded.

          • Timeline — (map)

            The timeline of the cluster step status over time.

            • CreationDateTime — (Date)

              The date and time when the cluster step was created.

            • StartDateTime — (Date)

              The date and time when the cluster step execution started.

            • EndDateTime — (Date)

              The date and time when the cluster step execution completed or failed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

listBootstrapActions(params = {}, callback) ⇒ AWS.Request

Provides information about the bootstrap actions associated with a cluster.

Service Reference:

Examples:

Calling the listBootstrapActions operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  Marker: 'STRING_VALUE'
};
emr.listBootstrapActions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The cluster identifier for the bootstrap actions to list.

    • Marker — (String)

      The pagination token that indicates the next set of results to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • BootstrapActions — (Array<map>)

        The bootstrap actions associated with the cluster.

        • Name — (String)

          The name of the command.

        • ScriptPath — (String)

          The Amazon S3 location of the command script.

        • Args — (Array<String>)

          Arguments for Amazon EMR to pass to the command for execution.

      • Marker — (String)

        The pagination token that indicates the next set of results to retrieve.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listClusters(params = {}, callback) ⇒ AWS.Request

Provides the status of all clusters visible to this AWS account. Allows you to filter the list of clusters based on certain criteria; for example, filtering by cluster creation date and time or by status. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListClusters calls.

Service Reference:

Examples:

Calling the listClusters operation

var params = {
  ClusterStates: [
    STARTING | BOOTSTRAPPING | RUNNING | WAITING | TERMINATING | TERMINATED | TERMINATED_WITH_ERRORS,
    /* more items */
  ],
  CreatedAfter: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  CreatedBefore: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  Marker: 'STRING_VALUE'
};
emr.listClusters(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CreatedAfter — (Date)

      The creation date and time beginning value filter for listing clusters.

    • CreatedBefore — (Date)

      The creation date and time end value filter for listing clusters.

    • ClusterStates — (Array<String>)

      The cluster state filters to apply when listing clusters.

    • Marker — (String)

      The pagination token that indicates the next set of results to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Clusters — (Array<map>)

        The list of clusters for the account based on the given filters.

        • Id — (String)

          The unique identifier for the cluster.

        • Name — (String)

          The name of the cluster.

        • Status — (map)

          The details about the current status of the cluster.

          • State — (String)

            The current state of the cluster.

            Possible values include:
            • "STARTING"
            • "BOOTSTRAPPING"
            • "RUNNING"
            • "WAITING"
            • "TERMINATING"
            • "TERMINATED"
            • "TERMINATED_WITH_ERRORS"
          • StateChangeReason — (map)

            The reason for the cluster status change.

            • Code — (String)

              The programmatic code for the state change reason.

              Possible values include:
              • "INTERNAL_ERROR"
              • "VALIDATION_ERROR"
              • "INSTANCE_FAILURE"
              • "INSTANCE_FLEET_TIMEOUT"
              • "BOOTSTRAP_FAILURE"
              • "USER_REQUEST"
              • "STEP_FAILURE"
              • "ALL_STEPS_COMPLETED"
            • Message — (String)

              The descriptive message for the state change reason.

          • Timeline — (map)

            A timeline that represents the status of a cluster over the lifetime of the cluster.

            • CreationDateTime — (Date)

              The creation date and time of the cluster.

            • ReadyDateTime — (Date)

              The date and time when the cluster was ready to execute steps.

            • EndDateTime — (Date)

              The date and time when the cluster was terminated.

        • NormalizedInstanceHours — (Integer)

          An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.

      • Marker — (String)

        The pagination token that indicates the next set of results to retrieve.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listInstanceFleets(params = {}, callback) ⇒ AWS.Request

Lists all available details about the instance fleets in a cluster.

Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

Service Reference:

Examples:

Calling the listInstanceFleets operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  Marker: 'STRING_VALUE'
};
emr.listInstanceFleets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The unique identifier of the cluster.

    • Marker — (String)

      The pagination token that indicates the next set of results to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • InstanceFleets — (Array<map>)

        The list of instance fleets for the cluster and given filters.

        • Id — (String)

          The unique identifier of the instance fleet.

        • Name — (String)

          A friendly name for the instance fleet.

        • Status — (map)

          The current status of the instance fleet.

          • State — (String)

            A code representing the instance fleet status.

            • PROVISIONING—The instance fleet is provisioning EC2 resources and is not yet ready to run jobs.

            • BOOTSTRAPPING—EC2 instances and other resources have been provisioned and the bootstrap actions specified for the instances are underway.

            • RUNNING—EC2 instances and other resources are running. They are either executing jobs or waiting to execute jobs.

            • RESIZING—A resize operation is underway. EC2 instances are either being added or removed.

            • SUSPENDED—A resize operation could not complete. Existing EC2 instances are running, but instances can't be added or removed.

            • TERMINATING—The instance fleet is terminating EC2 instances.

            • TERMINATED—The instance fleet is no longer active, and all EC2 instances have been terminated.

            Possible values include:
            • "PROVISIONING"
            • "BOOTSTRAPPING"
            • "RUNNING"
            • "RESIZING"
            • "SUSPENDED"
            • "TERMINATING"
            • "TERMINATED"
          • StateChangeReason — (map)

            Provides status change reason details for the instance fleet.

            • Code — (String)

              A code corresponding to the reason the state change occurred.

              Possible values include:
              • "INTERNAL_ERROR"
              • "VALIDATION_ERROR"
              • "INSTANCE_FAILURE"
              • "CLUSTER_TERMINATED"
            • Message — (String)

              An explanatory message.

          • Timeline — (map)

            Provides historical timestamps for the instance fleet, including the time of creation, the time it became ready to run jobs, and the time of termination.

            • CreationDateTime — (Date)

              The time and date the instance fleet was created.

            • ReadyDateTime — (Date)

              The time and date the instance fleet was ready to run jobs.

            • EndDateTime — (Date)

              The time and date the instance fleet terminated.

        • InstanceFleetType — (String)

          The node type that the instance fleet hosts. Valid values are MASTER, CORE, or TASK.

          Possible values include:
          • "MASTER"
          • "CORE"
          • "TASK"
        • TargetOnDemandCapacity — (Integer)

          The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When an On-Demand instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedOnDemandCapacity to determine the Spot capacity units that have been provisioned for the instance fleet.

          Note: If not specified or set to 0, only Spot instances are provisioned for the instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
        • TargetSpotCapacity — (Integer)

          The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. You can use InstanceFleet$ProvisionedSpotCapacity to determine the Spot capacity units that have been provisioned for the instance fleet.

          Note: If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
        • ProvisionedOnDemandCapacity — (Integer)

          The number of On-Demand units that have been provisioned for the instance fleet to fulfill TargetOnDemandCapacity. This provisioned capacity might be less than or greater than TargetOnDemandCapacity.

        • ProvisionedSpotCapacity — (Integer)

          The number of Spot units that have been provisioned for this instance fleet to fulfill TargetSpotCapacity. This provisioned capacity might be less than or greater than TargetSpotCapacity.

        • InstanceTypeSpecifications — (Array<map>)

          The specification for the instance types that comprise an instance fleet. Up to five unique instance specifications may be defined for each instance fleet.

          • InstanceType — (String)

            The EC2 instance type, for example m3.xlarge.

          • WeightedCapacity — (Integer)

            The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. Capacity values represent performance characteristics such as vCPUs, memory, or I/O. If not specified, the default value is 1.

          • BidPrice — (String)

            The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD.

          • BidPriceAsPercentageOfOnDemandPrice — (Float)

            The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType. Expressed as a number (for example, 20 specifies 20%).

          • Configurations — (Array<map>)

            A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software bundled with Amazon EMR.

            • Classification — (String)

              The classification within a configuration.

            • Properties — (map<String>)

              A set of properties specified within a configuration classification.

          • EbsBlockDevices — (Array<map>)

            The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType.

            • VolumeSpecification — (map)

              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.

              • VolumeTyperequired — (String)

                The volume type. Volume types supported are gp2, io1, standard.

              • Iops — (Integer)

                The number of I/O operations per second (IOPS) that the volume supports.

              • SizeInGBrequired — (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.

            • Device — (String)

              The device name that is exposed to the instance, such as /dev/sdh.

          • EbsOptimized — (Boolean)

            Evaluates to TRUE when the specified InstanceType is EBS-optimized.

        • LaunchSpecifications — (map)

          Describes the launch specification for an instance fleet.

          • SpotSpecificationrequired — (map)

            The launch specification for Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior.

            • TimeoutDurationMinutesrequired — (Integer)

              The spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

            • TimeoutActionrequired — (String)

              The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

              Possible values include:
              • "SWITCH_TO_ON_DEMAND"
              • "TERMINATE_CLUSTER"
            • BlockDurationMinutes — (Integer)

              The defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

      • Marker — (String)

        The pagination token that indicates the next set of results to retrieve.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listInstanceGroups(params = {}, callback) ⇒ AWS.Request

Provides all available details about the instance groups in a cluster.

Service Reference:

Examples:

Calling the listInstanceGroups operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  Marker: 'STRING_VALUE'
};
emr.listInstanceGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The identifier of the cluster for which to list the instance groups.

    • Marker — (String)

      The pagination token that indicates the next set of results to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • InstanceGroups — (Array<map>)

        The list of instance groups for the cluster and given filters.

        • Id — (String)

          The identifier of the instance group.

        • Name — (String)

          The name of the instance group.

        • Market — (String)

          The marketplace to provision instances for this group. Valid values are ON_DEMAND or SPOT.

          Possible values include:
          • "ON_DEMAND"
          • "SPOT"
        • InstanceGroupType — (String)

          The type of the instance group. Valid values are MASTER, CORE or TASK.

          Possible values include:
          • "MASTER"
          • "CORE"
          • "TASK"
        • BidPrice — (String)

          The maximum Spot price your are willing to pay for EC2 instances.

          An optional, nullable field that applies if the MarketType for the instance group is specified as SPOT. Specify the maximum spot price in USD. If the value is NULL and SPOT is specified, the maximum Spot price is set equal to the On-Demand price.

        • InstanceType — (String)

          The EC2 instance type for all instances in the instance group.

        • RequestedInstanceCount — (Integer)

          The target number of instances for the instance group.

        • RunningInstanceCount — (Integer)

          The number of instances currently running in this instance group.

        • Status — (map)

          The current status of the instance group.

          • State — (String)

            The current state of the instance group.

            Possible values include:
            • "PROVISIONING"
            • "BOOTSTRAPPING"
            • "RUNNING"
            • "RECONFIGURING"
            • "RESIZING"
            • "SUSPENDED"
            • "TERMINATING"
            • "TERMINATED"
            • "ARRESTED"
            • "SHUTTING_DOWN"
            • "ENDED"
          • StateChangeReason — (map)

            The status change reason details for the instance group.

            • Code — (String)

              The programmable code for the state change reason.

              Possible values include:
              • "INTERNAL_ERROR"
              • "VALIDATION_ERROR"
              • "INSTANCE_FAILURE"
              • "CLUSTER_TERMINATED"
            • Message — (String)

              The status change reason description.

          • Timeline — (map)

            The timeline of the instance group status over time.

            • CreationDateTime — (Date)

              The creation date and time of the instance group.

            • ReadyDateTime — (Date)

              The date and time when the instance group became ready to perform tasks.

            • EndDateTime — (Date)

              The date and time when the instance group terminated.

        • Configurations — (Array<map>)
          Note: Amazon EMR releases 4.x or later.

          The list of configurations supplied for an EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).

          • Classification — (String)

            The classification within a configuration.

          • Properties — (map<String>)

            A set of properties specified within a configuration classification.

        • ConfigurationsVersion — (Integer)

          The version number of the requested configuration specification for this instance group.

        • LastSuccessfullyAppliedConfigurations — (Array<map>)

          A list of configurations that were successfully applied for an instance group last time.

          • Classification — (String)

            The classification within a configuration.

          • Properties — (map<String>)

            A set of properties specified within a configuration classification.

        • LastSuccessfullyAppliedConfigurationsVersion — (Integer)

          The version number of a configuration specification that was successfully applied for an instance group last time.

        • EbsBlockDevices — (Array<map>)

          The EBS block devices that are mapped to this instance group.

          • VolumeSpecification — (map)

            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.

            • VolumeTyperequired — (String)

              The volume type. Volume types supported are gp2, io1, standard.

            • Iops — (Integer)

              The number of I/O operations per second (IOPS) that the volume supports.

            • SizeInGBrequired — (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.

          • Device — (String)

            The device name that is exposed to the instance, such as /dev/sdh.

        • EbsOptimized — (Boolean)

          If the instance group is EBS-optimized. An Amazon EBS-optimized instance uses an optimized configuration stack and provides additional, dedicated capacity for Amazon EBS I/O.

        • ShrinkPolicy — (map)

          Policy for customizing shrink operations.

          • DecommissionTimeout — (Integer)

            The desired timeout for decommissioning an instance. Overrides the default YARN decommissioning timeout.

          • InstanceResizePolicy — (map)

            Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.

            • InstancesToTerminate — (Array<String>)

              Specific list of instances to be terminated when shrinking an instance group.

            • InstancesToProtect — (Array<String>)

              Specific list of instances to be protected when shrinking an instance group.

            • InstanceTerminationTimeout — (Integer)

              Decommissioning timeout override for the specific list of instances to be terminated.

        • AutoScalingPolicy — (map)

          An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. See PutAutoScalingPolicy.

          • Status — (map)

            The status of an automatic scaling policy.

            • State — (String)

              Indicates the status of the automatic scaling policy.

              Possible values include:
              • "PENDING"
              • "ATTACHING"
              • "ATTACHED"
              • "DETACHING"
              • "DETACHED"
              • "FAILED"
            • StateChangeReason — (map)

              The reason for a change in status.

              • Code — (String)

                The code indicating the reason for the change in status.USER_REQUEST indicates that the scaling policy status was changed by a user. PROVISION_FAILURE indicates that the status change was because the policy failed to provision. CLEANUP_FAILURE indicates an error.

                Possible values include:
                • "USER_REQUEST"
                • "PROVISION_FAILURE"
                • "CLEANUP_FAILURE"
              • Message — (String)

                A friendly, more verbose message that accompanies an automatic scaling policy state change.

          • Constraints — (map)

            The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.

            • MinCapacityrequired — (Integer)

              The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.

            • MaxCapacityrequired — (Integer)

              The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary.

          • Rules — (Array<map>)

            The scale-in and scale-out rules that comprise the automatic scaling policy.

            • Namerequired — (String)

              The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy.

            • Description — (String)

              A friendly, more verbose description of the automatic scaling rule.

            • Actionrequired — (map)

              The conditions that trigger an automatic scaling activity.

              • Market — (String)

                Not available for instance groups. Instance groups use the market type specified for the group.

                Possible values include:
                • "ON_DEMAND"
                • "SPOT"
              • SimpleScalingPolicyConfigurationrequired — (map)

                The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.

                • AdjustmentType — (String)

                  The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of EC2 instances specified by ScalingAdjustment, which should be expressed as a positive integer.

                  Possible values include:
                  • "CHANGE_IN_CAPACITY"
                  • "PERCENT_CHANGE_IN_CAPACITY"
                  • "EXACT_CAPACITY"
                • ScalingAdjustmentrequired — (Integer)

                  The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.

                • CoolDown — (Integer)

                  The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.

            • Triggerrequired — (map)

              The CloudWatch alarm definition that determines when automatic scaling activity is triggered.

              • CloudWatchAlarmDefinitionrequired — (map)

                The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.

                • ComparisonOperatorrequired — (String)

                  Determines how the metric specified by MetricName is compared to the value specified by Threshold.

                  Possible values include:
                  • "GREATER_THAN_OR_EQUAL"
                  • "GREATER_THAN"
                  • "LESS_THAN"
                  • "LESS_THAN_OR_EQUAL"
                • EvaluationPeriods — (Integer)

                  The number of periods, expressed in seconds using Period, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.

                • MetricNamerequired — (String)

                  The name of the CloudWatch metric that is watched to determine an alarm condition.

                • Namespace — (String)

                  The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.

                • Periodrequired — (Integer)

                  The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.

                • Statistic — (String)

                  The statistic to apply to the metric associated with the alarm. The default is AVERAGE.

                  Possible values include:
                  • "SAMPLE_COUNT"
                  • "AVERAGE"
                  • "SUM"
                  • "MINIMUM"
                  • "MAXIMUM"
                • Thresholdrequired — (Float)

                  The value against which the specified statistic is compared.

                • Unit — (String)

                  The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.

                  Possible values include:
                  • "NONE"
                  • "SECONDS"
                  • "MICRO_SECONDS"
                  • "MILLI_SECONDS"
                  • "BYTES"
                  • "KILO_BYTES"
                  • "MEGA_BYTES"
                  • "GIGA_BYTES"
                  • "TERA_BYTES"
                  • "BITS"
                  • "KILO_BITS"
                  • "MEGA_BITS"
                  • "GIGA_BITS"
                  • "TERA_BITS"
                  • "PERCENT"
                  • "COUNT"
                  • "BYTES_PER_SECOND"
                  • "KILO_BYTES_PER_SECOND"
                  • "MEGA_BYTES_PER_SECOND"
                  • "GIGA_BYTES_PER_SECOND"
                  • "TERA_BYTES_PER_SECOND"
                  • "BITS_PER_SECOND"
                  • "KILO_BITS_PER_SECOND"
                  • "MEGA_BITS_PER_SECOND"
                  • "GIGA_BITS_PER_SECOND"
                  • "TERA_BITS_PER_SECOND"
                  • "COUNT_PER_SECOND"
                • Dimensions — (Array<map>)

                  A CloudWatch metric dimension.

                  • Key — (String)

                    The dimension name.

                  • Value — (String)

                    The dimension value.

      • Marker — (String)

        The pagination token that indicates the next set of results to retrieve.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listInstances(params = {}, callback) ⇒ AWS.Request

Provides information for all active EC2 instances and EC2 instances terminated in the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.

Service Reference:

Examples:

Calling the listInstances operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  InstanceFleetId: 'STRING_VALUE',
  InstanceFleetType: MASTER | CORE | TASK,
  InstanceGroupId: 'STRING_VALUE',
  InstanceGroupTypes: [
    MASTER | CORE | TASK,
    /* more items */
  ],
  InstanceStates: [
    AWAITING_FULFILLMENT | PROVISIONING | BOOTSTRAPPING | RUNNING | TERMINATED,
    /* more items */
  ],
  Marker: 'STRING_VALUE'
};
emr.listInstances(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The identifier of the cluster for which to list the instances.

    • InstanceGroupId — (String)

      The identifier of the instance group for which to list the instances.

    • InstanceGroupTypes — (Array<String>)

      The type of instance group for which to list the instances.

    • InstanceFleetId — (String)

      The unique identifier of the instance fleet.

    • InstanceFleetType — (String)

      The node type of the instance fleet. For example MASTER, CORE, or TASK.

      Possible values include:
      • "MASTER"
      • "CORE"
      • "TASK"
    • InstanceStates — (Array<String>)

      A list of instance states that will filter the instances returned with this request.

    • Marker — (String)

      The pagination token that indicates the next set of results to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Instances — (Array<map>)

        The list of instances for the cluster and given filters.

        • Id — (String)

          The unique identifier for the instance in Amazon EMR.

        • Ec2InstanceId — (String)

          The unique identifier of the instance in Amazon EC2.

        • PublicDnsName — (String)

          The public DNS name of the instance.

        • PublicIpAddress — (String)

          The public IP address of the instance.

        • PrivateDnsName — (String)

          The private DNS name of the instance.

        • PrivateIpAddress — (String)

          The private IP address of the instance.

        • Status — (map)

          The current status of the instance.

          • State — (String)

            The current state of the instance.

            Possible values include:
            • "AWAITING_FULFILLMENT"
            • "PROVISIONING"
            • "BOOTSTRAPPING"
            • "RUNNING"
            • "TERMINATED"
          • StateChangeReason — (map)

            The details of the status change reason for the instance.

            • Code — (String)

              The programmable code for the state change reason.

              Possible values include:
              • "INTERNAL_ERROR"
              • "VALIDATION_ERROR"
              • "INSTANCE_FAILURE"
              • "BOOTSTRAP_FAILURE"
              • "CLUSTER_TERMINATED"
            • Message — (String)

              The status change reason description.

          • Timeline — (map)

            The timeline of the instance status over time.

            • CreationDateTime — (Date)

              The creation date and time of the instance.

            • ReadyDateTime — (Date)

              The date and time when the instance was ready to perform tasks.

            • EndDateTime — (Date)

              The date and time when the instance was terminated.

        • InstanceGroupId — (String)

          The identifier of the instance group to which this instance belongs.

        • InstanceFleetId — (String)

          The unique identifier of the instance fleet to which an EC2 instance belongs.

        • Market — (String)

          The instance purchasing option. Valid values are ON_DEMAND or SPOT.

          Possible values include:
          • "ON_DEMAND"
          • "SPOT"
        • InstanceType — (String)

          The EC2 instance type, for example m3.xlarge.

        • EbsVolumes — (Array<map>)

          The list of EBS volumes that are attached to this instance.

          • Device — (String)

            The device name that is exposed to the instance, such as /dev/sdh.

          • VolumeId — (String)

            The volume identifier of the EBS volume.

      • Marker — (String)

        The pagination token that indicates the next set of results to retrieve.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSecurityConfigurations(params = {}, callback) ⇒ AWS.Request

Lists all the security configurations visible to this account, providing their creation dates and times, and their names. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListSecurityConfigurations calls.

Service Reference:

Examples:

Calling the listSecurityConfigurations operation

var params = {
  Marker: 'STRING_VALUE'
};
emr.listSecurityConfigurations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Marker — (String)

      The pagination token that indicates the set of results to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SecurityConfigurations — (Array<map>)

        The creation date and time, and name, of each security configuration.

        • Name — (String)

          The name of the security configuration.

        • CreationDateTime — (Date)

          The date and time the security configuration was created.

      • Marker — (String)

        A pagination token that indicates the next set of results to retrieve. Include the marker in the next ListSecurityConfiguration call to retrieve the next page of results, if required.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSteps(params = {}, callback) ⇒ AWS.Request

Provides a list of steps for the cluster in reverse order unless you specify stepIds with the request.

Service Reference:

Examples:

Calling the listSteps operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  Marker: 'STRING_VALUE',
  StepIds: [
    'STRING_VALUE',
    /* more items */
  ],
  StepStates: [
    PENDING | CANCEL_PENDING | RUNNING | COMPLETED | CANCELLED | FAILED | INTERRUPTED,
    /* more items */
  ]
};
emr.listSteps(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The identifier of the cluster for which to list the steps.

    • StepStates — (Array<String>)

      The filter to limit the step list based on certain states.

    • StepIds — (Array<String>)

      The filter to limit the step list based on the identifier of the steps.

    • Marker — (String)

      The pagination token that indicates the next set of results to retrieve.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Steps — (Array<map>)

        The filtered list of steps for the cluster.

        • Id — (String)

          The identifier of the cluster step.

        • Name — (String)

          The name of the cluster step.

        • Config — (map)

          The Hadoop job configuration of the cluster step.

          • Jar — (String)

            The path to the JAR file that runs during the step.

          • Properties — (map<String>)

            The list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

          • MainClass — (String)

            The name of the main class in the specified Java file. If not specified, the JAR file should specify a main class in its manifest file.

          • Args — (Array<String>)

            The list of command line arguments to pass to the JAR file's main function for execution.

        • ActionOnFailure — (String)

          The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is available for backward compatibility. We recommend using TERMINATE_CLUSTER instead.

          Possible values include:
          • "TERMINATE_JOB_FLOW"
          • "TERMINATE_CLUSTER"
          • "CANCEL_AND_WAIT"
          • "CONTINUE"
        • Status — (map)

          The current execution status details of the cluster step.

          • State — (String)

            The execution state of the cluster step.

            Possible values include:
            • "PENDING"
            • "CANCEL_PENDING"
            • "RUNNING"
            • "COMPLETED"
            • "CANCELLED"
            • "FAILED"
            • "INTERRUPTED"
          • StateChangeReason — (map)

            The reason for the step execution status change.

            • Code — (String)

              The programmable code for the state change reason. Note: Currently, the service provides no code for the state change.

              Possible values include:
              • "NONE"
            • Message — (String)

              The descriptive message for the state change reason.

          • FailureDetails — (map)

            The details for the step failure including reason, message, and log file path where the root cause was identified.

            • Reason — (String)

              The reason for the step failure. In the case where the service cannot successfully determine the root cause of the failure, it returns "Unknown Error" as a reason.

            • Message — (String)

              The descriptive message including the error the EMR service has identified as the cause of step failure. This is text from an error log that describes the root cause of the failure.

            • LogFile — (String)

              The path to the log file where the step failure root cause was originally recorded.

          • Timeline — (map)

            The timeline of the cluster step status over time.

            • CreationDateTime — (Date)

              The date and time when the cluster step was created.

            • StartDateTime — (Date)

              The date and time when the cluster step execution started.

            • EndDateTime — (Date)

              The date and time when the cluster step execution completed or failed.

      • Marker — (String)

        The pagination token that indicates the next set of results to retrieve.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyInstanceFleet(params = {}, callback) ⇒ AWS.Request

Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically.

Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

Service Reference:

Examples:

Calling the modifyInstanceFleet operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  InstanceFleet: { /* required */
    InstanceFleetId: 'STRING_VALUE', /* required */
    TargetOnDemandCapacity: 'NUMBER_VALUE',
    TargetSpotCapacity: 'NUMBER_VALUE'
  }
};
emr.modifyInstanceFleet(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The unique identifier of the cluster.

    • InstanceFleet — (map)

      The unique identifier of the instance fleet.

      • InstanceFleetIdrequired — (String)

        A unique identifier for the instance fleet.

      • TargetOnDemandCapacity — (Integer)

        The target capacity of On-Demand units for the instance fleet. For more information see InstanceFleetConfig$TargetOnDemandCapacity.

      • TargetSpotCapacity — (Integer)

        The target capacity of Spot units for the instance fleet. For more information, see InstanceFleetConfig$TargetSpotCapacity.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

modifyInstanceGroups(params = {}, callback) ⇒ AWS.Request

ModifyInstanceGroups modifies the number of nodes and configuration settings of an instance group. The input parameters include the new target instance count for the group and the instance group ID. The call will either succeed or fail atomically.

Service Reference:

Examples:

Calling the modifyInstanceGroups operation

var params = {
  ClusterId: 'STRING_VALUE',
  InstanceGroups: [
    {
      InstanceGroupId: 'STRING_VALUE', /* required */
      Configurations: [ /* ConfigurationList */
        {
          Classification: 'STRING_VALUE',
          Configurations: /* recursive ConfigurationList */,
          Properties: {
            '<String>': 'STRING_VALUE',
            /* '<String>': ... */
          }
        },
        /* more items */
      ],
      EC2InstanceIdsToTerminate: [
        'STRING_VALUE',
        /* more items */
      ],
      InstanceCount: 'NUMBER_VALUE',
      ShrinkPolicy: {
        DecommissionTimeout: 'NUMBER_VALUE',
        InstanceResizePolicy: {
          InstanceTerminationTimeout: 'NUMBER_VALUE',
          InstancesToProtect: [
            'STRING_VALUE',
            /* more items */
          ],
          InstancesToTerminate: [
            'STRING_VALUE',
            /* more items */
          ]
        }
      }
    },
    /* more items */
  ]
};
emr.modifyInstanceGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      The ID of the cluster to which the instance group belongs.

    • InstanceGroups — (Array<map>)

      Instance groups to change.

      • InstanceGroupIdrequired — (String)

        Unique ID of the instance group to expand or shrink.

      • InstanceCount — (Integer)

        Target size for the instance group.

      • EC2InstanceIdsToTerminate — (Array<String>)

        The EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to its original requested size.

      • ShrinkPolicy — (map)

        Policy for customizing shrink operations.

        • DecommissionTimeout — (Integer)

          The desired timeout for decommissioning an instance. Overrides the default YARN decommissioning timeout.

        • InstanceResizePolicy — (map)

          Custom policy for requesting termination protection or termination of specific instances when shrinking an instance group.

          • InstancesToTerminate — (Array<String>)

            Specific list of instances to be terminated when shrinking an instance group.

          • InstancesToProtect — (Array<String>)

            Specific list of instances to be protected when shrinking an instance group.

          • InstanceTerminationTimeout — (Integer)

            Decommissioning timeout override for the specific list of instances to be terminated.

      • Configurations — (Array<map>)

        A list of new or modified configurations to apply for an instance group.

        • Classification — (String)

          The classification within a configuration.

        • Properties — (map<String>)

          A set of properties specified within a configuration classification.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putAutoScalingPolicy(params = {}, callback) ⇒ AWS.Request

Creates or updates an automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.

Service Reference:

Examples:

Calling the putAutoScalingPolicy operation

var params = {
  AutoScalingPolicy: { /* required */
    Constraints: { /* required */
      MaxCapacity: 'NUMBER_VALUE', /* required */
      MinCapacity: 'NUMBER_VALUE' /* required */
    },
    Rules: [ /* required */
      {
        Action: { /* required */
          SimpleScalingPolicyConfiguration: { /* required */
            ScalingAdjustment: 'NUMBER_VALUE', /* required */
            AdjustmentType: CHANGE_IN_CAPACITY | PERCENT_CHANGE_IN_CAPACITY | EXACT_CAPACITY,
            CoolDown: 'NUMBER_VALUE'
          },
          Market: ON_DEMAND | SPOT
        },
        Name: 'STRING_VALUE', /* required */
        Trigger: { /* required */
          CloudWatchAlarmDefinition: { /* required */
            ComparisonOperator: GREATER_THAN_OR_EQUAL | GREATER_THAN | LESS_THAN | LESS_THAN_OR_EQUAL, /* required */
            MetricName: 'STRING_VALUE', /* required */
            Period: 'NUMBER_VALUE', /* required */
            Threshold: 'NUMBER_VALUE', /* required */
            Dimensions: [
              {
                Key: 'STRING_VALUE',
                Value: 'STRING_VALUE'
              },
              /* more items */
            ],
            EvaluationPeriods: 'NUMBER_VALUE',
            Namespace: 'STRING_VALUE',
            Statistic: SAMPLE_COUNT | AVERAGE | SUM | MINIMUM | MAXIMUM,
            Unit: NONE | SECONDS | MICRO_SECONDS | MILLI_SECONDS | BYTES | KILO_BYTES | MEGA_BYTES | GIGA_BYTES | TERA_BYTES | BITS | KILO_BITS | MEGA_BITS | GIGA_BITS | TERA_BITS | PERCENT | COUNT | BYTES_PER_SECOND | KILO_BYTES_PER_SECOND | MEGA_BYTES_PER_SECOND | GIGA_BYTES_PER_SECOND | TERA_BYTES_PER_SECOND | BITS_PER_SECOND | KILO_BITS_PER_SECOND | MEGA_BITS_PER_SECOND | GIGA_BITS_PER_SECOND | TERA_BITS_PER_SECOND | COUNT_PER_SECOND
          }
        },
        Description: 'STRING_VALUE'
      },
      /* more items */
    ]
  },
  ClusterId: 'STRING_VALUE', /* required */
  InstanceGroupId: 'STRING_VALUE' /* required */
};
emr.putAutoScalingPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.

    • InstanceGroupId — (String)

      Specifies the ID of the instance group to which the automatic scaling policy is applied.

    • AutoScalingPolicy — (map)

      Specifies the definition of the automatic scaling policy.

      • Constraintsrequired — (map)

        The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.

        • MinCapacityrequired — (Integer)

          The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.

        • MaxCapacityrequired — (Integer)

          The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary.

      • Rulesrequired — (Array<map>)

        The scale-in and scale-out rules that comprise the automatic scaling policy.

        • Namerequired — (String)

          The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy.

        • Description — (String)

          A friendly, more verbose description of the automatic scaling rule.

        • Actionrequired — (map)

          The conditions that trigger an automatic scaling activity.

          • Market — (String)

            Not available for instance groups. Instance groups use the market type specified for the group.

            Possible values include:
            • "ON_DEMAND"
            • "SPOT"
          • SimpleScalingPolicyConfigurationrequired — (map)

            The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.

            • AdjustmentType — (String)

              The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of EC2 instances specified by ScalingAdjustment, which should be expressed as a positive integer.

              Possible values include:
              • "CHANGE_IN_CAPACITY"
              • "PERCENT_CHANGE_IN_CAPACITY"
              • "EXACT_CAPACITY"
            • ScalingAdjustmentrequired — (Integer)

              The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.

            • CoolDown — (Integer)

              The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.

        • Triggerrequired — (map)

          The CloudWatch alarm definition that determines when automatic scaling activity is triggered.

          • CloudWatchAlarmDefinitionrequired — (map)

            The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.

            • ComparisonOperatorrequired — (String)

              Determines how the metric specified by MetricName is compared to the value specified by Threshold.

              Possible values include:
              • "GREATER_THAN_OR_EQUAL"
              • "GREATER_THAN"
              • "LESS_THAN"
              • "LESS_THAN_OR_EQUAL"
            • EvaluationPeriods — (Integer)

              The number of periods, expressed in seconds using Period, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.

            • MetricNamerequired — (String)

              The name of the CloudWatch metric that is watched to determine an alarm condition.

            • Namespace — (String)

              The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.

            • Periodrequired — (Integer)

              The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.

            • Statistic — (String)

              The statistic to apply to the metric associated with the alarm. The default is AVERAGE.

              Possible values include:
              • "SAMPLE_COUNT"
              • "AVERAGE"
              • "SUM"
              • "MINIMUM"
              • "MAXIMUM"
            • Thresholdrequired — (Float)

              The value against which the specified statistic is compared.

            • Unit — (String)

              The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.

              Possible values include:
              • "NONE"
              • "SECONDS"
              • "MICRO_SECONDS"
              • "MILLI_SECONDS"
              • "BYTES"
              • "KILO_BYTES"
              • "MEGA_BYTES"
              • "GIGA_BYTES"
              • "TERA_BYTES"
              • "BITS"
              • "KILO_BITS"
              • "MEGA_BITS"
              • "GIGA_BITS"
              • "TERA_BITS"
              • "PERCENT"
              • "COUNT"
              • "BYTES_PER_SECOND"
              • "KILO_BYTES_PER_SECOND"
              • "MEGA_BYTES_PER_SECOND"
              • "GIGA_BYTES_PER_SECOND"
              • "TERA_BYTES_PER_SECOND"
              • "BITS_PER_SECOND"
              • "KILO_BITS_PER_SECOND"
              • "MEGA_BITS_PER_SECOND"
              • "GIGA_BITS_PER_SECOND"
              • "TERA_BITS_PER_SECOND"
              • "COUNT_PER_SECOND"
            • Dimensions — (Array<map>)

              A CloudWatch metric dimension.

              • Key — (String)

                The dimension name.

              • Value — (String)

                The dimension value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ClusterId — (String)

        Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.

      • InstanceGroupId — (String)

        Specifies the ID of the instance group to which the scaling policy is applied.

      • AutoScalingPolicy — (map)

        The automatic scaling policy definition.

        • Status — (map)

          The status of an automatic scaling policy.

          • State — (String)

            Indicates the status of the automatic scaling policy.

            Possible values include:
            • "PENDING"
            • "ATTACHING"
            • "ATTACHED"
            • "DETACHING"
            • "DETACHED"
            • "FAILED"
          • StateChangeReason — (map)

            The reason for a change in status.

            • Code — (String)

              The code indicating the reason for the change in status.USER_REQUEST indicates that the scaling policy status was changed by a user. PROVISION_FAILURE indicates that the status change was because the policy failed to provision. CLEANUP_FAILURE indicates an error.

              Possible values include:
              • "USER_REQUEST"
              • "PROVISION_FAILURE"
              • "CLEANUP_FAILURE"
            • Message — (String)

              A friendly, more verbose message that accompanies an automatic scaling policy state change.

        • Constraints — (map)

          The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.

          • MinCapacityrequired — (Integer)

            The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.

          • MaxCapacityrequired — (Integer)

            The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary.

        • Rules — (Array<map>)

          The scale-in and scale-out rules that comprise the automatic scaling policy.

          • Namerequired — (String)

            The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy.

          • Description — (String)

            A friendly, more verbose description of the automatic scaling rule.

          • Actionrequired — (map)

            The conditions that trigger an automatic scaling activity.

            • Market — (String)

              Not available for instance groups. Instance groups use the market type specified for the group.

              Possible values include:
              • "ON_DEMAND"
              • "SPOT"
            • SimpleScalingPolicyConfigurationrequired — (map)

              The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.

              • AdjustmentType — (String)

                The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of EC2 instances specified by ScalingAdjustment, which should be expressed as a positive integer.

                Possible values include:
                • "CHANGE_IN_CAPACITY"
                • "PERCENT_CHANGE_IN_CAPACITY"
                • "EXACT_CAPACITY"
              • ScalingAdjustmentrequired — (Integer)

                The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.

              • CoolDown — (Integer)

                The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.

          • Triggerrequired — (map)

            The CloudWatch alarm definition that determines when automatic scaling activity is triggered.

            • CloudWatchAlarmDefinitionrequired — (map)

              The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.

              • ComparisonOperatorrequired — (String)

                Determines how the metric specified by MetricName is compared to the value specified by Threshold.

                Possible values include:
                • "GREATER_THAN_OR_EQUAL"
                • "GREATER_THAN"
                • "LESS_THAN"
                • "LESS_THAN_OR_EQUAL"
              • EvaluationPeriods — (Integer)

                The number of periods, expressed in seconds using Period, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.

              • MetricNamerequired — (String)

                The name of the CloudWatch metric that is watched to determine an alarm condition.

              • Namespace — (String)

                The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.

              • Periodrequired — (Integer)

                The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.

              • Statistic — (String)

                The statistic to apply to the metric associated with the alarm. The default is AVERAGE.

                Possible values include:
                • "SAMPLE_COUNT"
                • "AVERAGE"
                • "SUM"
                • "MINIMUM"
                • "MAXIMUM"
              • Thresholdrequired — (Float)

                The value against which the specified statistic is compared.

              • Unit — (String)

                The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.

                Possible values include:
                • "NONE"
                • "SECONDS"
                • "MICRO_SECONDS"
                • "MILLI_SECONDS"
                • "BYTES"
                • "KILO_BYTES"
                • "MEGA_BYTES"
                • "GIGA_BYTES"
                • "TERA_BYTES"
                • "BITS"
                • "KILO_BITS"
                • "MEGA_BITS"
                • "GIGA_BITS"
                • "TERA_BITS"
                • "PERCENT"
                • "COUNT"
                • "BYTES_PER_SECOND"
                • "KILO_BYTES_PER_SECOND"
                • "MEGA_BYTES_PER_SECOND"
                • "GIGA_BYTES_PER_SECOND"
                • "TERA_BYTES_PER_SECOND"
                • "BITS_PER_SECOND"
                • "KILO_BITS_PER_SECOND"
                • "MEGA_BITS_PER_SECOND"
                • "GIGA_BITS_PER_SECOND"
                • "TERA_BITS_PER_SECOND"
                • "COUNT_PER_SECOND"
              • Dimensions — (Array<map>)

                A CloudWatch metric dimension.

                • Key — (String)

                  The dimension name.

                • Value — (String)

                  The dimension value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

removeAutoScalingPolicy(params = {}, callback) ⇒ AWS.Request

Removes an automatic scaling policy from a specified instance group within an EMR cluster.

Service Reference:

Examples:

Calling the removeAutoScalingPolicy operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  InstanceGroupId: 'STRING_VALUE' /* required */
};
emr.removeAutoScalingPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ClusterId — (String)

      Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.

    • InstanceGroupId — (String)

      Specifies the ID of the instance group to which the scaling policy is applied.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

removeTags(params = {}, callback) ⇒ AWS.Request

Removes tags from an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.

The following example removes the stack tag with value Prod from a cluster:

Service Reference:

Examples:

Calling the removeTags operation

var params = {
  ResourceId: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
emr.removeTags(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceId — (String)

      The Amazon EMR resource identifier from which tags will be removed. This value must be a cluster identifier.

    • TagKeys — (Array<String>)

      A list of tag keys to remove from a resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

runJobFlow(params = {}, callback) ⇒ AWS.Request

RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the steps specified. After the steps complete, the cluster stops and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3. If the JobFlowInstancesConfig KeepJobFlowAliveWhenNoSteps parameter is set to TRUE, the cluster transitions to the WAITING state rather than shutting down after the steps have completed.

For additional protection, you can set the JobFlowInstancesConfig TerminationProtected parameter to TRUE to lock the cluster and prevent it from being terminated by API call, user intervention, or in the event of a job flow error.

A maximum of 256 steps are allowed in each job flow.

If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, see Add More than 256 Steps to a Cluster in the Amazon EMR Management Guide.

For long running clusters, we recommend that you periodically store your results.

Note: The instance fleets configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. The RunJobFlow request can contain InstanceFleets parameters or InstanceGroups parameters, but not both.

Service Reference:

Examples:

Calling the runJobFlow operation

var params = {
  Instances: { /* required */
    AdditionalMasterSecurityGroups: [
      'STRING_VALUE',
      /* more items */
    ],
    AdditionalSlaveSecurityGroups: [
      'STRING_VALUE',
      /* more items */
    ],
    Ec2KeyName: 'STRING_VALUE',
    Ec2SubnetId: 'STRING_VALUE',
    Ec2SubnetIds: [
      'STRING_VALUE',
      /* more items */
    ],
    EmrManagedMasterSecurityGroup: 'STRING_VALUE',
    EmrManagedSlaveSecurityGroup: 'STRING_VALUE',
    HadoopVersion: 'STRING_VALUE',
    InstanceCount: 'NUMBER_VALUE',
    InstanceFleets: [
      {
        InstanceFleetType: MASTER | CORE | TASK, /* required */
        InstanceTypeConfigs: [
          {
            InstanceType: 'STRING_VALUE', /* required */
            BidPrice: 'STRING_VALUE',
            BidPriceAsPercentageOfOnDemandPrice: 'NUMBER_VALUE',
            Configurations: [ /* ConfigurationList */
              {
                Classification: 'STRING_VALUE',
                Configurations: /* recursive ConfigurationList */,
                Properties: {
                  '<String>': 'STRING_VALUE',
                  /* '<String>': ... */
                }
              },
              /* more items */
            ],
            EbsConfiguration: {
              EbsBlockDeviceConfigs: [
                {
                  VolumeSpecification: { /* required */
                    SizeInGB: 'NUMBER_VALUE', /* required */
                    VolumeType: 'STRING_VALUE', /* required */
                    Iops: 'NUMBER_VALUE'
                  },
                  VolumesPerInstance: 'NUMBER_VALUE'
                },
                /* more items */
              ],
              EbsOptimized: true || false
            },
            WeightedCapacity: 'NUMBER_VALUE'
          },
          /* more items */
        ],
        LaunchSpecifications: {
          SpotSpecification: { /* required */
            TimeoutAction: SWITCH_TO_ON_DEMAND | TERMINATE_CLUSTER, /* required */
            TimeoutDurationMinutes: 'NUMBER_VALUE', /* required */
            BlockDurationMinutes: 'NUMBER_VALUE'
          }
        },
        Name: 'STRING_VALUE',
        TargetOnDemandCapacity: 'NUMBER_VALUE',
        TargetSpotCapacity: 'NUMBER_VALUE'
      },
      /* more items */
    ],
    InstanceGroups: [
      {
        InstanceCount: 'NUMBER_VALUE', /* required */
        InstanceRole: MASTER | CORE | TASK, /* required */
        InstanceType: 'STRING_VALUE', /* required */
        AutoScalingPolicy: {
          Constraints: { /* required */
            MaxCapacity: 'NUMBER_VALUE', /* required */
            MinCapacity: 'NUMBER_VALUE' /* required */
          },
          Rules: [ /* required */
            {
              Action: { /* required */
                SimpleScalingPolicyConfiguration: { /* required */
                  ScalingAdjustment: 'NUMBER_VALUE', /* required */
                  AdjustmentType: CHANGE_IN_CAPACITY | PERCENT_CHANGE_IN_CAPACITY | EXACT_CAPACITY,
                  CoolDown: 'NUMBER_VALUE'
                },
                Market: ON_DEMAND | SPOT
              },
              Name: 'STRING_VALUE', /* required */
              Trigger: { /* required */
                CloudWatchAlarmDefinition: { /* required */
                  ComparisonOperator: GREATER_THAN_OR_EQUAL | GREATER_THAN | LESS_THAN | LESS_THAN_OR_EQUAL, /* required */
                  MetricName: 'STRING_VALUE', /* required */
                  Period: 'NUMBER_VALUE', /* required */
                  Threshold: 'NUMBER_VALUE', /* required */
                  Dimensions: [
                    {
                      Key: 'STRING_VALUE',
                      Value: 'STRING_VALUE'
                    },
                    /* more items */
                  ],
                  EvaluationPeriods: 'NUMBER_VALUE',
                  Namespace: 'STRING_VALUE',
                  Statistic: SAMPLE_COUNT | AVERAGE | SUM | MINIMUM | MAXIMUM,
                  Unit: NONE | SECONDS | MICRO_SECONDS | MILLI_SECONDS | BYTES | KILO_BYTES | MEGA_BYTES | GIGA_BYTES | TERA_BYTES | BITS | KILO_BITS | MEGA_BITS | GIGA_BITS | TERA_BITS | PERCENT | COUNT | BYTES_PER_SECOND | KILO_BYTES_PER_SECOND | MEGA_BYTES_PER_SECOND | GIGA_BYTES_PER_SECOND | TERA_BYTES_PER_SECOND | BITS_PER_SECOND | KILO_BITS_PER_SECOND | MEGA_BITS_PER_SECOND | GIGA_BITS_PER_SECOND | TERA_BITS_PER_SECOND | COUNT_PER_SECOND
                }
              },
              Description: 'STRING_VALUE'
            },
            /* more items */
          ]
        },
        BidPrice: 'STRING_VALUE',
        Configurations: [ /* ConfigurationList */
          {
            Classification: 'STRING_VALUE',
            Configurations: /* recursive ConfigurationList */,
            Properties: {
              '<String>': 'STRING_VALUE',
              /* '<String>': ... */
            }
          },
          /* more items */
        ],
        EbsConfiguration: {
          EbsBlockDeviceConfigs: [
            {
              VolumeSpecification: { /* required */
                SizeInGB: 'NUMBER_VALUE', /* required */
                VolumeType: 'STRING_VALUE', /* required */
                Iops: 'NUMBER_VALUE'
              },
              VolumesPerInstance: 'NUMBER_VALUE'
            },
            /* more items */
          ],
          EbsOptimized: true || false
        },
        Market: ON_DEMAND | SPOT,
        Name: 'STRING_VALUE'
      },
      /* more items */
    ],
    KeepJobFlowAliveWhenNoSteps: true || false,
    MasterInstanceType: 'STRING_VALUE',
    Placement: {
      AvailabilityZone: 'STRING_VALUE',
      AvailabilityZones: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    ServiceAccessSecurityGroup: 'STRING_VALUE',
    SlaveInstanceType: 'STRING_VALUE',
    TerminationProtected: true || false
  },
  Name: 'STRING_VALUE', /* required */
  AdditionalInfo: 'STRING_VALUE',
  AmiVersion: 'STRING_VALUE',
  Applications: [
    {
      AdditionalInfo: {
        '<String>': 'STRING_VALUE',
        /* '<String>': ... */
      },
      Args: [
        'STRING_VALUE',
        /* more items */
      ],
      Name: 'STRING_VALUE',
      Version: 'STRING_VALUE'
    },
    /* more items */
  ],
  AutoScalingRole: 'STRING_VALUE',
  BootstrapActions: [
    {
      Name: 'STRING_VALUE', /* required */
      ScriptBootstrapAction: { /* required */
        Path: 'STRING_VALUE', /* required */
        Args: [
          'STRING_VALUE',
          /* more items */
        ]
      }
    },
    /* more items */
  ],
  Configurations: [ /* ConfigurationList */
    {
      Classification: 'STRING_VALUE',
      Configurations: /* recursive ConfigurationList */,
      Properties: {
        '<String>': 'STRING_VALUE',
        /* '<String>': ... */
      }
    },
    /* more items */
  ],
  CustomAmiId: 'STRING_VALUE',
  EbsRootVolumeSize: 'NUMBER_VALUE',
  JobFlowRole: 'STRING_VALUE',
  KerberosAttributes: {
    KdcAdminPassword: 'STRING_VALUE', /* required */
    Realm: 'STRING_VALUE', /* required */
    ADDomainJoinPassword: 'STRING_VALUE',
    ADDomainJoinUser: 'STRING_VALUE',
    CrossRealmTrustPrincipalPassword: 'STRING_VALUE'
  },
  LogUri: 'STRING_VALUE',
  NewSupportedProducts: [
    {
      Args: [
        'STRING_VALUE',
        /* more items */
      ],
      Name: 'STRING_VALUE'
    },
    /* more items */
  ],
  ReleaseLabel: 'STRING_VALUE',
  RepoUpgradeOnBoot: SECURITY | NONE,
  ScaleDownBehavior: TERMINATE_AT_INSTANCE_HOUR | TERMINATE_AT_TASK_COMPLETION,
  SecurityConfiguration: 'STRING_VALUE',
  ServiceRole: 'STRING_VALUE',
  Steps: [
    {
      HadoopJarStep: { /* required */
        Jar: 'STRING_VALUE', /* required */
        Args: [
          'STRING_VALUE',
          /* more items */
        ],
        MainClass: 'STRING_VALUE',
        Properties: [
          {
            Key: 'STRING_VALUE',
            Value: 'STRING_VALUE'
          },
          /* more items */
        ]
      },
      Name: 'STRING_VALUE', /* required */
      ActionOnFailure: TERMINATE_JOB_FLOW | TERMINATE_CLUSTER | CANCEL_AND_WAIT | CONTINUE
    },
    /* more items */
  ],
  SupportedProducts: [
    'STRING_VALUE',
    /* more items */
  ],
  Tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  VisibleToAllUsers: true || false
};
emr.runJobFlow(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the job flow.

    • LogUri — (String)

      The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.

    • AdditionalInfo — (String)

      A JSON string for selecting additional features.

    • AmiVersion — (String)

      Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID.

    • ReleaseLabel — (String)

      The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, emr-5.14.0. For more information about Amazon EMR release versions and included application versions and features, see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR releases versions 4.x and later. Earlier versions use AmiVersion.

    • Instances — (map)

      A specification of the number and type of Amazon EC2 instances.

      • MasterInstanceType — (String)

        The EC2 instance type of the master node.

      • SlaveInstanceType — (String)

        The EC2 instance type of the core and task nodes.

      • InstanceCount — (Integer)

        The number of EC2 instances in the cluster.

      • InstanceGroups — (Array<map>)

        Configuration for the instance groups in a cluster.

        • Name — (String)

          Friendly name given to the instance group.

        • Market — (String)

          Market type of the EC2 instances used to create a cluster node.

          Possible values include:
          • "ON_DEMAND"
          • "SPOT"
        • InstanceRolerequired — (String)

          The role of the instance group in the cluster.

          Possible values include:
          • "MASTER"
          • "CORE"
          • "TASK"
        • BidPrice — (String)

          The maximum Spot price your are willing to pay for EC2 instances.

          An optional, nullable field that applies if the MarketType for the instance group is specified as SPOT. Specify the maximum spot price in USD. If the value is NULL and SPOT is specified, the maximum Spot price is set equal to the On-Demand price.

        • InstanceTyperequired — (String)

          The EC2 instance type for all instances in the instance group.

        • InstanceCountrequired — (Integer)

          Target number of instances for the instance group.

        • Configurations — (Array<map>)
          Note: Amazon EMR releases 4.x or later.

          The list of configurations supplied for an EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).

          • Classification — (String)

            The classification within a configuration.

          • Properties — (map<String>)

            A set of properties specified within a configuration classification.

        • EbsConfiguration — (map)

          EBS configurations that will be attached to each EC2 instance in the instance group.

          • EbsBlockDeviceConfigs — (Array<map>)

            An array of Amazon EBS volume specifications attached to a cluster instance.

            • VolumeSpecificationrequired — (map)

              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.

              • VolumeTyperequired — (String)

                The volume type. Volume types supported are gp2, io1, standard.

              • Iops — (Integer)

                The number of I/O operations per second (IOPS) that the volume supports.

              • SizeInGBrequired — (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.

            • VolumesPerInstance — (Integer)

              Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group

          • EbsOptimized — (Boolean)

            Indicates whether an Amazon EBS volume is EBS-optimized.

        • AutoScalingPolicy — (map)

          An automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. See PutAutoScalingPolicy.

          • Constraintsrequired — (map)

            The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not cause an instance group to grow above or below these limits.

            • MinCapacityrequired — (Integer)

              The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.

            • MaxCapacityrequired — (Integer)

              The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary.

          • Rulesrequired — (Array<map>)

            The scale-in and scale-out rules that comprise the automatic scaling policy.

            • Namerequired — (String)

              The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy.

            • Description — (String)

              A friendly, more verbose description of the automatic scaling rule.

            • Actionrequired — (map)

              The conditions that trigger an automatic scaling activity.

              • Market — (String)

                Not available for instance groups. Instance groups use the market type specified for the group.

                Possible values include:
                • "ON_DEMAND"
                • "SPOT"
              • SimpleScalingPolicyConfigurationrequired — (map)

                The type of adjustment the automatic scaling activity makes when triggered, and the periodicity of the adjustment.

                • AdjustmentType — (String)

                  The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of EC2 instances specified by ScalingAdjustment, which should be expressed as a positive integer.

                  Possible values include:
                  • "CHANGE_IN_CAPACITY"
                  • "PERCENT_CHANGE_IN_CAPACITY"
                  • "EXACT_CAPACITY"
                • ScalingAdjustmentrequired — (Integer)

                  The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.

                • CoolDown — (Integer)

                  The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.

            • Triggerrequired — (map)

              The CloudWatch alarm definition that determines when automatic scaling activity is triggered.

              • CloudWatchAlarmDefinitionrequired — (map)

                The definition of a CloudWatch metric alarm. When the defined alarm conditions are met along with other trigger parameters, scaling activity begins.

                • ComparisonOperatorrequired — (String)

                  Determines how the metric specified by MetricName is compared to the value specified by Threshold.

                  Possible values include:
                  • "GREATER_THAN_OR_EQUAL"
                  • "GREATER_THAN"
                  • "LESS_THAN"
                  • "LESS_THAN_OR_EQUAL"
                • EvaluationPeriods — (Integer)

                  The number of periods, expressed in seconds using Period, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.

                • MetricNamerequired — (String)

                  The name of the CloudWatch metric that is watched to determine an alarm condition.

                • Namespace — (String)

                  The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.

                • Periodrequired — (Integer)

                  The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.

                • Statistic — (String)

                  The statistic to apply to the metric associated with the alarm. The default is AVERAGE.

                  Possible values include:
                  • "SAMPLE_COUNT"
                  • "AVERAGE"
                  • "SUM"
                  • "MINIMUM"
                  • "MAXIMUM"
                • Thresholdrequired — (Float)

                  The value against which the specified statistic is compared.

                • Unit — (String)

                  The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.

                  Possible values include:
                  • "NONE"
                  • "SECONDS"
                  • "MICRO_SECONDS"
                  • "MILLI_SECONDS"
                  • "BYTES"
                  • "KILO_BYTES"
                  • "MEGA_BYTES"
                  • "GIGA_BYTES"
                  • "TERA_BYTES"
                  • "BITS"
                  • "KILO_BITS"
                  • "MEGA_BITS"
                  • "GIGA_BITS"
                  • "TERA_BITS"
                  • "PERCENT"
                  • "COUNT"
                  • "BYTES_PER_SECOND"
                  • "KILO_BYTES_PER_SECOND"
                  • "MEGA_BYTES_PER_SECOND"
                  • "GIGA_BYTES_PER_SECOND"
                  • "TERA_BYTES_PER_SECOND"
                  • "BITS_PER_SECOND"
                  • "KILO_BITS_PER_SECOND"
                  • "MEGA_BITS_PER_SECOND"
                  • "GIGA_BITS_PER_SECOND"
                  • "TERA_BITS_PER_SECOND"
                  • "COUNT_PER_SECOND"
                • Dimensions — (Array<map>)

                  A CloudWatch metric dimension.

                  • Key — (String)

                    The dimension name.

                  • Value — (String)

                    The dimension value.

      • InstanceFleets — (Array<map>)
        Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

        Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.

        • Name — (String)

          The friendly name of the instance fleet.

        • InstanceFleetTyperequired — (String)

          The node type that the instance fleet hosts. Valid values are MASTER,CORE,and TASK.

          Possible values include:
          • "MASTER"
          • "CORE"
          • "TASK"
        • TargetOnDemandCapacity — (Integer)

          The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When an On-Demand instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.

          Note: If not specified or set to 0, only Spot instances are provisioned for the instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
        • TargetSpotCapacity — (Integer)

          The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.

          Note: If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.
        • InstanceTypeConfigs — (Array<map>)

          The instance type configurations that define the EC2 instances in the instance fleet.

          • InstanceTyperequired — (String)

            An EC2 instance type, such as m3.xlarge.

          • WeightedCapacity — (Integer)

            The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified.

          • BidPrice — (String)

            The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.

          • BidPriceAsPercentageOfOnDemandPrice — (Float)

            The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType. Expressed as a number (for example, 20 specifies 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.

          • EbsConfiguration — (map)

            The configuration of Amazon Elastic Block Storage (EBS) attached to each instance as defined by InstanceType.

            • EbsBlockDeviceConfigs — (Array<map>)

              An array of Amazon EBS volume specifications attached to a cluster instance.

              • VolumeSpecificationrequired — (map)

                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.

                • VolumeTyperequired — (String)

                  The volume type. Volume types supported are gp2, io1, standard.

                • Iops — (Integer)

                  The number of I/O operations per second (IOPS) that the volume supports.

                • SizeInGBrequired — (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.

              • VolumesPerInstance — (Integer)

                Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group

            • EbsOptimized — (Boolean)

              Indicates whether an Amazon EBS volume is EBS-optimized.

          • Configurations — (Array<map>)

            A configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster.

            • Classification — (String)

              The classification within a configuration.

            • Properties — (map<String>)

              A set of properties specified within a configuration classification.

        • LaunchSpecifications — (map)

          The launch specification for the instance fleet.

          • SpotSpecificationrequired — (map)

            The launch specification for Spot instances in the fleet, which determines the defined duration and provisioning timeout behavior.

            • TimeoutDurationMinutesrequired — (Integer)

              The spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.

            • TimeoutActionrequired — (String)

              The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.

              Possible values include:
              • "SWITCH_TO_ON_DEMAND"
              • "TERMINATE_CLUSTER"
            • BlockDurationMinutes — (Integer)

              The defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

      • Ec2KeyName — (String)

        The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop."

      • Placement — (map)

        The Availability Zone in which the cluster runs.

        • AvailabilityZone — (String)

          The Amazon EC2 Availability Zone for the cluster. AvailabilityZone is used for uniform instance groups, while AvailabilityZones (plural) is used for instance fleets.

        • AvailabilityZones — (Array<String>)

          When multiple Availability Zones are specified, Amazon EMR evaluates them and launches instances in the optimal Availability Zone. AvailabilityZones is used for instance fleets, while AvailabilityZone (singular) is used for uniform instance groups.

          Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
      • KeepJobFlowAliveWhenNoSteps — (Boolean)

        Specifies whether the cluster should remain available after completing all steps.

      • TerminationProtected — (Boolean)

        Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.

      • HadoopVersion — (String)

        Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (deprecated), "0.20" (deprecated), "0.20.205" (deprecated), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.

      • Ec2SubnetId — (String)

        Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, the cluster launches in the normal Amazon Web Services cloud, outside of an Amazon VPC, if the account launching the cluster supports EC2 Classic networks in the region where the cluster launches.

        Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus you cannot specify the cc1.4xlarge instance type for clusters launched in an Amazon VPC.

      • Ec2SubnetIds — (Array<String>)

        Applies to clusters that use the instance fleet configuration. When multiple EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.

        Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
      • EmrManagedMasterSecurityGroup — (String)

        The identifier of the Amazon EC2 security group for the master node.

      • EmrManagedSlaveSecurityGroup — (String)

        The identifier of the Amazon EC2 security group for the core and task nodes.

      • ServiceAccessSecurityGroup — (String)

        The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.

      • AdditionalMasterSecurityGroups — (Array<String>)

        A list of additional Amazon EC2 security group IDs for the master node.

      • AdditionalSlaveSecurityGroups — (Array<String>)

        A list of additional Amazon EC2 security group IDs for the core and task nodes.

    • Steps — (Array<map>)

      A list of steps to run.

      • Namerequired — (String)

        The name of the step.

      • ActionOnFailure — (String)

        The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.

        Possible values include:
        • "TERMINATE_JOB_FLOW"
        • "TERMINATE_CLUSTER"
        • "CANCEL_AND_WAIT"
        • "CONTINUE"
      • HadoopJarSteprequired — (map)

        The JAR file used for the step.

        • Properties — (Array<map>)

          A list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

          • Key — (String)

            The unique identifier of a key value pair.

          • Value — (String)

            The value part of the identified key.

        • Jarrequired — (String)

          A path to a JAR file run during the step.

        • MainClass — (String)

          The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.

        • Args — (Array<String>)

          A list of command line arguments passed to the JAR file's main function when executed.

    • BootstrapActions — (Array<map>)

      A list of bootstrap actions to run before Hadoop starts on the cluster nodes.

      • Namerequired — (String)

        The name of the bootstrap action.

      • ScriptBootstrapActionrequired — (map)

        The script run by the bootstrap action.

        • Pathrequired — (String)

          Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.

        • Args — (Array<String>)

          A list of command line arguments to pass to the bootstrap action script.

    • SupportedProducts — (Array<String>)
      Note: For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.

      A list of strings that indicates third-party software to use. For more information, see the Amazon EMR Developer Guide. Currently supported values are:

      • "mapr-m3" - launch the job flow using MapR M3 Edition.

      • "mapr-m5" - launch the job flow using MapR M5 Edition.

    • NewSupportedProducts — (Array<map>)
      Note: For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.

      A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer Guide. Supported values are:

      • "mapr-m3" - launch the cluster using MapR M3 Edition.

      • "mapr-m5" - launch the cluster using MapR M5 Edition.

      • "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.

      • "mapr-m7" - launch the cluster using MapR M7 Edition.

      • "hunk" - launch the cluster with the Hunk Big Data Analtics Platform.

      • "hue"- launch the cluster with Hue installed.

      • "spark" - launch the cluster with Apache Spark installed.

      • "ganglia" - launch the cluster with the Ganglia Monitoring System installed.

      • Name — (String)

        The name of the product configuration.

      • Args — (Array<String>)

        The list of user-supplied arguments.

    • Applications — (Array<map>)

      Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMR Release Guide.

      • Name — (String)

        The name of the application.

      • Version — (String)

        The version of the application.

      • Args — (Array<String>)

        Arguments for Amazon EMR to pass to the application.

      • AdditionalInfo — (map<String>)

        This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purposes.

    • Configurations — (Array<map>)

      For Amazon EMR releases 4.0 and later. The list of configurations supplied for the EMR cluster you are creating.

      • Classification — (String)

        The classification within a configuration.

      • Configurations — (Array<map>)

        A list of additional configurations to apply within a configuration object.

      • Properties — (map<String>)

        A set of properties specified within a configuration classification.

    • VisibleToAllUsers — (Boolean)

      Whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the cluster. If it is set to false, only the IAM user that created the cluster can view and manage it.

    • JobFlowRole — (String)

      Also called instance profile and EC2 role. An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role. The default role is EMR_EC2_DefaultRole. In order to use the default role, you must have already created it using the CLI or console.

    • ServiceRole — (String)

      The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.

    • Tags — (Array<map>)

      A list of tags to associate with a cluster and propagate to Amazon EC2 instances.

      • Key — (String)

        A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag .

      • Value — (String)

        A user-defined value, which is optional in a tag. For more information, see Tag Clusters.

    • SecurityConfiguration — (String)

      The name of a security configuration to apply to the cluster.

    • AutoScalingRole — (String)

      An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

    • ScaleDownBehavior — (String)

      Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR blacklists and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.

      Possible values include:
      • "TERMINATE_AT_INSTANCE_HOUR"
      • "TERMINATE_AT_TASK_COMPLETION"
    • CustomAmiId — (String)

      Available only in Amazon EMR version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster EC2 instances. For more information about custom AMIs in Amazon EMR, see Using a Custom AMI in the Amazon EMR Management Guide. If omitted, the cluster uses the base Linux AMI for the ReleaseLabel specified. For Amazon EMR versions 2.x and 3.x, use AmiVersion instead.

      For information about creating a custom AMI, see Creating an Amazon EBS-Backed Linux AMI in the Amazon Elastic Compute Cloud User Guide for Linux Instances. For information about finding an AMI ID, see Finding a Linux AMI.

    • EbsRootVolumeSize — (Integer)

      The size, in GiB, of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

    • RepoUpgradeOnBoot — (String)

      Applies only when CustomAmiID is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is SECURITY, which indicates that only security updates are applied. If NONE is specified, no updates are applied, and all updates must be applied manually.

      Possible values include:
      • "SECURITY"
      • "NONE"
    • KerberosAttributes — (map)

      Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see Use Kerberos Authentication in the EMR Management Guide.

      • Realmrequired — (String)

        The name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL.

      • KdcAdminPasswordrequired — (String)

        The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster.

      • CrossRealmTrustPrincipalPassword — (String)

        Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms.

      • ADDomainJoinUser — (String)

        Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain.

      • ADDomainJoinPassword — (String)

        The Active Directory password for ADDomainJoinUser.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • JobFlowId — (String)

        An unique identifier for the job flow.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setTerminationProtection(params = {}, callback) ⇒ AWS.Request

SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling SetTerminationProtection on a cluster is similar to calling the Amazon EC2 DisableAPITermination API on all EC2 instances in a cluster.

SetTerminationProtection is used to prevent accidental termination of a cluster and to ensure that in the event of an error, the instances persist so that you can recover any data stored in their ephemeral instance storage.

To terminate a cluster that has been locked by setting SetTerminationProtection to true, you must first unlock the job flow by a subsequent call to SetTerminationProtection in which you set the value to false.

For more information, seeManaging Cluster Termination in the Amazon EMR Management Guide.

Service Reference:

Examples:

Calling the setTerminationProtection operation

var params = {
  JobFlowIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  TerminationProtected: true || false /* required */
};
emr.setTerminationProtection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • JobFlowIds — (Array<String>)

      A list of strings that uniquely identify the clusters to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows .

    • TerminationProtected — (Boolean)

      A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

setVisibleToAllUsers(params = {}, callback) ⇒ AWS.Request

Sets whether all AWS Identity and Access Management (IAM) users under your account can access the specified clusters (job flows). This action works on running clusters. You can also set the visibility of a cluster when you launch it using the VisibleToAllUsers parameter of RunJobFlow. The SetVisibleToAllUsers action can be called only by an IAM user who created the cluster or the AWS account that owns the cluster.

Service Reference:

Examples:

Calling the setVisibleToAllUsers operation

var params = {
  JobFlowIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  VisibleToAllUsers: true || false /* required */
};
emr.setVisibleToAllUsers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • JobFlowIds — (Array<String>)

      Identifiers of the job flows to receive the new visibility setting.

    • VisibleToAllUsers — (Boolean)

      Whether the specified clusters are visible to all IAM users of the AWS account associated with the cluster. If this value is set to True, all IAM users of that AWS account can view and, if they have the proper IAM policy permissions set, manage the clusters. If it is set to False, only the IAM user that created a cluster can view and manage it.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

terminateJobFlows(params = {}, callback) ⇒ AWS.Request

TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut down, any step not yet completed is canceled and the EC2 instances on which the cluster is running are stopped. Any log files not already saved are uploaded to Amazon S3 if a LogUri was specified when the cluster was created.

The maximum number of clusters allowed is 10. The call to TerminateJobFlows is asynchronous. Depending on the configuration of the cluster, it may take up to 1-5 minutes for the cluster to completely terminate and release allocated resources, such as Amazon EC2 instances.

Service Reference:

Examples:

Calling the terminateJobFlows operation

var params = {
  JobFlowIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
emr.terminateJobFlows(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • JobFlowIds — (Array<String>)

      A list of job flows to be shutdown.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given EMR resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Examples:

Waiting for the clusterRunning state

var params = {
  ClusterId: 'STRING_VALUE' /* required */
};
emr.waitFor('clusterRunning', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • state (String)

    the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.

  • params (map) (defaults to: {})

    a list of parameters for the given state. See each waiter resource state for required parameters.

Callback (callback):

  • function(err, data) { ... }

    Callback containing error and data information. See the respective resource state for the expected error or data information.

    If the waiter times out its requests, it will return a ResourceNotReady error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

Waiter Resource Details

emr.waitFor('clusterRunning', params = {}, [callback]) ⇒ AWS.Request

Waits for the clusterRunning state by periodically calling the underlying EMR.describeCluster() operation every 30 seconds (at most 60 times).

Examples:

Waiting for the clusterRunning state

var params = {
  ClusterId: 'STRING_VALUE' /* required */
};
emr.waitFor('clusterRunning', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ClusterId — (String)

      The identifier of the cluster to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Cluster — (map)

        This output contains the details for the requested cluster.

        • Id — (String)

          The unique identifier for the cluster.

        • Name — (String)

          The name of the cluster.

        • Status — (map)

          The current status details about the cluster.

          • State — (String)

            The current state of the cluster.

            Possible values include:
            • "STARTING"
            • "BOOTSTRAPPING"
            • "RUNNING"
            • "WAITING"
            • "TERMINATING"
            • "TERMINATED"
            • "TERMINATED_WITH_ERRORS"
          • StateChangeReason — (map)

            The reason for the cluster status change.

            • Code — (String)

              The programmatic code for the state change reason.

              Possible values include:
              • "INTERNAL_ERROR"
              • "VALIDATION_ERROR"
              • "INSTANCE_FAILURE"
              • "INSTANCE_FLEET_TIMEOUT"
              • "BOOTSTRAP_FAILURE"
              • "USER_REQUEST"
              • "STEP_FAILURE"
              • "ALL_STEPS_COMPLETED"
            • Message — (String)

              The descriptive message for the state change reason.

          • Timeline — (map)

            A timeline that represents the status of a cluster over the lifetime of the cluster.

            • CreationDateTime — (Date)

              The creation date and time of the cluster.

            • ReadyDateTime — (Date)

              The date and time when the cluster was ready to execute steps.

            • EndDateTime — (Date)

              The date and time when the cluster was terminated.

        • Ec2InstanceAttributes — (map)

          Provides information about the EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.

          • Ec2KeyName — (String)

            The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".

          • Ec2SubnetId — (String)

            To launch the cluster in Amazon VPC, set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, the cluster is launched in the normal AWS cloud, outside of a VPC.

            Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus, you cannot specify the cc1.4xlarge instance type for nodes of a cluster launched in a VPC.

          • RequestedEc2SubnetIds — (Array<String>)

            Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more Amazon EC2 subnets in which to launch EC2 cluster instances. Subnets must exist within the same VPC. Amazon EMR chooses the EC2 subnet with the best fit from among the list of RequestedEc2SubnetIds, and then launches all cluster instances within that Subnet. If this value is not specified, and the account and region support EC2-Classic networks, the cluster launches instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones instead of this setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.

          • Ec2AvailabilityZone — (String)

            The Availability Zone in which the cluster will run.

          • RequestedEc2AvailabilityZones — (Array<String>)

            Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which to launch EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones, and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.

          • IamInstanceProfile — (String)

            The IAM role that was specified when the cluster was launched. The EC2 instances of the cluster assume this role.

          • EmrManagedMasterSecurityGroup — (String)

            The identifier of the Amazon EC2 security group for the master node.

          • EmrManagedSlaveSecurityGroup — (String)

            The identifier of the Amazon EC2 security group for the core and task nodes.

          • ServiceAccessSecurityGroup — (String)

            The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.

          • AdditionalMasterSecurityGroups — (Array<String>)

            A list of additional Amazon EC2 security group IDs for the master node.

          • AdditionalSlaveSecurityGroups — (Array<String>)

            A list of additional Amazon EC2 security group IDs for the core and task nodes.

        • InstanceCollectionType — (String)
          Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

          The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a uniform instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets configuration.

          Possible values include:
          • "INSTANCE_FLEET"
          • "INSTANCE_GROUP"
        • LogUri — (String)

          The path to the Amazon S3 location where logs for this cluster are stored.

        • RequestedAmiVersion — (String)

          The AMI version requested for this cluster.

        • RunningAmiVersion — (String)

          The AMI version running on this cluster.

        • ReleaseLabel — (String)

          The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, emr-5.14.0. For more information about Amazon EMR release versions and included application versions and features, see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR releases versions 4.x and later. Earlier versions use AmiVersion.

        • AutoTerminate — (Boolean)

          Specifies whether the cluster should terminate after completing all steps.

        • TerminationProtected — (Boolean)

          Indicates whether Amazon EMR will lock the cluster to prevent the EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.

        • VisibleToAllUsers — (Boolean)

          Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set to true, all IAM users of that AWS account can view and manage the cluster if they have the proper policy permissions set. If this value is false, only the IAM user that created the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers action.

        • Applications — (Array<map>)

          The applications installed on this cluster.

          • Name — (String)

            The name of the application.

          • Version — (String)

            The version of the application.

          • Args — (Array<String>)

            Arguments for Amazon EMR to pass to the application.

          • AdditionalInfo — (map<String>)

            This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purposes.

        • Tags — (Array<map>)

          A list of tags associated with a cluster.

          • Key — (String)

            A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag .

          • Value — (String)

            A user-defined value, which is optional in a tag. For more information, see Tag Clusters.

        • ServiceRole — (String)

          The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.

        • NormalizedInstanceHours — (Integer)

          An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.

        • MasterPublicDnsName — (String)

          The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

        • Configurations — (Array<map>)

          Applies only to Amazon EMR releases 4.x and later. The list of Configurations supplied to the EMR cluster.

          • Classification — (String)

            The classification within a configuration.

          • Properties — (map<String>)

            A set of properties specified within a configuration classification.

        • SecurityConfiguration — (String)

          The name of the security configuration applied to the cluster.

        • AutoScalingRole — (String)

          An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

        • ScaleDownBehavior — (String)

          The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR blacklists and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.

          Possible values include:
          • "TERMINATE_AT_INSTANCE_HOUR"
          • "TERMINATE_AT_TASK_COMPLETION"
        • CustomAmiId — (String)

          Available only in Amazon EMR version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.

        • EbsRootVolumeSize — (Integer)

          The size, in GiB, of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

        • 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"
        • KerberosAttributes — (map)

          Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see Use Kerberos Authentication in the EMR Management Guide.

          • Realmrequired — (String)

            The name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL.

          • KdcAdminPasswordrequired — (String)

            The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster.

          • CrossRealmTrustPrincipalPassword — (String)

            Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms.

          • ADDomainJoinUser — (String)

            Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain.

          • ADDomainJoinPassword — (String)

            The Active Directory password for ADDomainJoinUser.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

emr.waitFor('stepComplete', params = {}, [callback]) ⇒ AWS.Request

Waits for the stepComplete state by periodically calling the underlying EMR.describeStep() operation every 30 seconds (at most 60 times).

Examples:

Waiting for the stepComplete state

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  StepId: 'STRING_VALUE' /* required */
};
emr.waitFor('stepComplete', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ClusterId — (String)

      The identifier of the cluster with steps to describe.

    • StepId — (String)

      The identifier of the step to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Step — (map)

        The step details for the requested step identifier.

        • Id — (String)

          The identifier of the cluster step.

        • Name — (String)

          The name of the cluster step.

        • Config — (map)

          The Hadoop job configuration of the cluster step.

          • Jar — (String)

            The path to the JAR file that runs during the step.

          • Properties — (map<String>)

            The list of Java properties that are set when the step runs. You can use these properties to pass key value pairs to your main function.

          • MainClass — (String)

            The name of the main class in the specified Java file. If not specified, the JAR file should specify a main class in its manifest file.

          • Args — (Array<String>)

            The list of command line arguments to pass to the JAR file's main function for execution.

        • ActionOnFailure — (String)

          The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.

          Possible values include:
          • "TERMINATE_JOB_FLOW"
          • "TERMINATE_CLUSTER"
          • "CANCEL_AND_WAIT"
          • "CONTINUE"
        • Status — (map)

          The current execution status details of the cluster step.

          • State — (String)

            The execution state of the cluster step.

            Possible values include:
            • "PENDING"
            • "CANCEL_PENDING"
            • "RUNNING"
            • "COMPLETED"
            • "CANCELLED"
            • "FAILED"
            • "INTERRUPTED"
          • StateChangeReason — (map)

            The reason for the step execution status change.

            • Code — (String)

              The programmable code for the state change reason. Note: Currently, the service provides no code for the state change.

              Possible values include:
              • "NONE"
            • Message — (String)

              The descriptive message for the state change reason.

          • FailureDetails — (map)

            The details for the step failure including reason, message, and log file path where the root cause was identified.

            • Reason — (String)

              The reason for the step failure. In the case where the service cannot successfully determine the root cause of the failure, it returns "Unknown Error" as a reason.

            • Message — (String)

              The descriptive message including the error the EMR service has identified as the cause of step failure. This is text from an error log that describes the root cause of the failure.

            • LogFile — (String)

              The path to the log file where the step failure root cause was originally recorded.

          • Timeline — (map)

            The timeline of the cluster step status over time.

            • CreationDateTime — (Date)

              The date and time when the cluster step was created.

            • StartDateTime — (Date)

              The date and time when the cluster step execution started.

            • EndDateTime — (Date)

              The date and time when the cluster step execution completed or failed.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also:

emr.waitFor('clusterTerminated', params = {}, [callback]) ⇒ AWS.Request

Waits for the clusterTerminated state by periodically calling the underlying EMR.describeCluster() operation every 30 seconds (at most 60 times).

Examples:

Waiting for the clusterTerminated state

var params = {
  ClusterId: 'STRING_VALUE' /* required */
};
emr.waitFor('clusterTerminated', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • ClusterId — (String)

      The identifier of the cluster to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Cluster — (map)

        This output contains the details for the requested cluster.

        • Id — (String)

          The unique identifier for the cluster.

        • Name — (String)

          The name of the cluster.

        • Status — (map)

          The current status details about the cluster.

          • State — (String)

            The current state of the cluster.

            Possible values include:
            • "STARTING"
            • "BOOTSTRAPPING"
            • "RUNNING"
            • "WAITING"
            • "TERMINATING"
            • "TERMINATED"
            • "TERMINATED_WITH_ERRORS"
          • StateChangeReason — (map)

            The reason for the cluster status change.

            • Code — (String)

              The programmatic code for the state change reason.

              Possible values include:
              • "INTERNAL_ERROR"
              • "VALIDATION_ERROR"
              • "INSTANCE_FAILURE"
              • "INSTANCE_FLEET_TIMEOUT"
              • "BOOTSTRAP_FAILURE"
              • "USER_REQUEST"
              • "STEP_FAILURE"
              • "ALL_STEPS_COMPLETED"
            • Message — (String)

              The descriptive message for the state change reason.

          • Timeline — (map)

            A timeline that represents the status of a cluster over the lifetime of the cluster.

            • CreationDateTime — (Date)

              The creation date and time of the cluster.

            • ReadyDateTime — (Date)

              The date and time when the cluster was ready to execute steps.

            • EndDateTime — (Date)

              The date and time when the cluster was terminated.

        • Ec2InstanceAttributes — (map)

          Provides information about the EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.

          • Ec2KeyName — (String)

            The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".

          • Ec2SubnetId — (String)

            To launch the cluster in Amazon VPC, set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value, the cluster is launched in the normal AWS cloud, outside of a VPC.

            Amazon VPC currently does not support cluster compute quadruple extra large (cc1.4xlarge) instances. Thus, you cannot specify the cc1.4xlarge instance type for nodes of a cluster launched in a VPC.

          • RequestedEc2SubnetIds — (Array<String>)

            Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more Amazon EC2 subnets in which to launch EC2 cluster instances. Subnets must exist within the same VPC. Amazon EMR chooses the EC2 subnet with the best fit from among the list of RequestedEc2SubnetIds, and then launches all cluster instances within that Subnet. If this value is not specified, and the account and region support EC2-Classic networks, the cluster launches instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones instead of this setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.

          • Ec2AvailabilityZone — (String)

            The Availability Zone in which the cluster will run.

          • RequestedEc2AvailabilityZones — (Array<String>)

            Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which to launch EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones, and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs and RequestedEc2AvailabilityZones cannot be specified together.

          • IamInstanceProfile — (String)

            The IAM role that was specified when the cluster was launched. The EC2 instances of the cluster assume this role.

          • EmrManagedMasterSecurityGroup — (String)

            The identifier of the Amazon EC2 security group for the master node.

          • EmrManagedSlaveSecurityGroup — (String)

            The identifier of the Amazon EC2 security group for the core and task nodes.

          • ServiceAccessSecurityGroup — (String)

            The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.

          • AdditionalMasterSecurityGroups — (Array<String>)

            A list of additional Amazon EC2 security group IDs for the master node.

          • AdditionalSlaveSecurityGroups — (Array<String>)

            A list of additional Amazon EC2 security group IDs for the core and task nodes.

        • InstanceCollectionType — (String)
          Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

          The instance group configuration of the cluster. A value of INSTANCE_GROUP indicates a uniform instance group configuration. A value of INSTANCE_FLEET indicates an instance fleets configuration.

          Possible values include:
          • "INSTANCE_FLEET"
          • "INSTANCE_GROUP"
        • LogUri — (String)

          The path to the Amazon S3 location where logs for this cluster are stored.

        • RequestedAmiVersion — (String)

          The AMI version requested for this cluster.

        • RunningAmiVersion — (String)

          The AMI version running on this cluster.

        • ReleaseLabel — (String)

          The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR release version, for example, emr-5.14.0. For more information about Amazon EMR release versions and included application versions and features, see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR releases versions 4.x and later. Earlier versions use AmiVersion.

        • AutoTerminate — (Boolean)

          Specifies whether the cluster should terminate after completing all steps.

        • TerminationProtected — (Boolean)

          Indicates whether Amazon EMR will lock the cluster to prevent the EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.

        • VisibleToAllUsers — (Boolean)

          Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set to true, all IAM users of that AWS account can view and manage the cluster if they have the proper policy permissions set. If this value is false, only the IAM user that created the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers action.

        • Applications — (Array<map>)

          The applications installed on this cluster.

          • Name — (String)

            The name of the application.

          • Version — (String)

            The version of the application.

          • Args — (Array<String>)

            Arguments for Amazon EMR to pass to the application.

          • AdditionalInfo — (map<String>)

            This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purposes.

        • Tags — (Array<map>)

          A list of tags associated with a cluster.

          • Key — (String)

            A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag .

          • Value — (String)

            A user-defined value, which is optional in a tag. For more information, see Tag Clusters.

        • ServiceRole — (String)

          The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.

        • NormalizedInstanceHours — (Integer)

          An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.

        • MasterPublicDnsName — (String)

          The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.

        • Configurations — (Array<map>)

          Applies only to Amazon EMR releases 4.x and later. The list of Configurations supplied to the EMR cluster.

          • Classification — (String)

            The classification within a configuration.

          • Properties — (map<String>)

            A set of properties specified within a configuration classification.

        • SecurityConfiguration — (String)

          The name of the security configuration applied to the cluster.

        • AutoScalingRole — (String)

          An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.

        • ScaleDownBehavior — (String)

          The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR blacklists and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION is available only in Amazon EMR version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.

          Possible values include:
          • "TERMINATE_AT_INSTANCE_HOUR"
          • "TERMINATE_AT_TASK_COMPLETION"
        • CustomAmiId — (String)

          Available only in Amazon EMR version 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.

        • EbsRootVolumeSize — (Integer)

          The size, in GiB, of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.

        • 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"
        • KerberosAttributes — (map)

          Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see Use Kerberos Authentication in the EMR Management Guide.

          • Realmrequired — (String)

            The name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL.

          • KdcAdminPasswordrequired — (String)

            The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster.

          • CrossRealmTrustPrincipalPassword — (String)

            Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms.

          • ADDomainJoinUser — (String)

            Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain.

          • ADDomainJoinPassword — (String)

            The Active Directory password for ADDomainJoinUser.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also: