You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

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 easier to process large amounts of data efficiently. Amazon EMR uses Hadoop processing combined with several Amazon Web Services services to do tasks such as web indexing, data mining, log file analysis, machine learning, scientific simulation, and data warehouse management.

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 collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

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|AWS.Endpoint)

    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' or an Endpoint object.

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

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets 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 error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • 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|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

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

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

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 */
        ],
        CustomAmiId: 'STRING_VALUE',
        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: {
      OnDemandSpecification: {
        AllocationStrategy: lowest-price, /* required */
        CapacityReservationOptions: {
          CapacityReservationPreference: open | none,
          CapacityReservationResourceGroupArn: 'STRING_VALUE',
          UsageStrategy: use-capacity-reservations-first
        }
      },
      SpotSpecification: {
        TimeoutAction: SWITCH_TO_ON_DEMAND | TERMINATE_CLUSTER, /* required */
        TimeoutDurationMinutes: 'NUMBER_VALUE', /* required */
        AllocationStrategy: capacity-optimized,
        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 Store (Amazon 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.

        • CustomAmiId — (String)

          The custom AMI ID to use for the instance type.

      • LaunchSpecifications — (map)

        The launch specification for the instance fleet.

        • SpotSpecification — (map)

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

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

          • AllocationStrategy — (String)

            Specifies the strategy to use in launching Spot Instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

            Possible values include:
            • "capacity-optimized"
        • OnDemandSpecification — (map)

          The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.

          Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.
          • AllocationStrategyrequired — (String)

            Specifies the strategy to use in launching On-Demand instance fleets. Currently, the only option is lowest-price (the default), which launches the lowest price first.

            Possible values include:
            • "lowest-price"
          • CapacityReservationOptions — (map)

            The launch specification for On-Demand instances in the instance fleet, which determines the allocation strategy.

            • UsageStrategy — (String)

              Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

              If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price).

              If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand allocation strategy.

              Possible values include:
              • "use-capacity-reservations-first"
            • CapacityReservationPreference — (String)

              Indicates the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.

              Possible values include:
              • "open"
              • "none"
            • CapacityReservationResourceGroupArn — (String)

              The ARN of the Capacity Reservation resource group in which to run the instance.

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.

      • ClusterArn — (String)

        The Amazon Resource Name of the cluster.

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 */
      ],
      CustomAmiId: 'STRING_VALUE',
      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)

        If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.

      • 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, in five-minute increments, 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.

      • CustomAmiId — (String)

        The custom AMI ID to use for the provisioned instance group.

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

      • ClusterArn — (String)

        The Amazon Resource Name of the cluster.

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 step fails. Use one of the following values:

        • TERMINATE_CLUSTER - Shuts down the cluster.

        • CANCEL_AND_WAIT - Cancels any pending steps and returns the cluster to the WAITING state.

        • CONTINUE - Continues to the next step in the queue.

        • TERMINATE_JOB_FLOW - Shuts down the cluster. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.

        If a cluster's StepConcurrencyLevel is greater than 1, do not use AddJobFlowSteps to submit a step with this parameter set to CANCEL_AND_WAIT or TERMINATE_CLUSTER. The step is not submitted and the action fails with a message that the ActionOnFailure setting is not valid.

        If you change a cluster's StepConcurrencyLevel to be greater than 1 while a step is running, the ActionOnFailure parameter may not behave as you expect. In this case, for a step that fails with this parameter set to CANCEL_AND_WAIT, pending steps and the running step are not canceled; for a step that fails with this parameter set to TERMINATE_CLUSTER, the cluster does not terminate.

        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, such as a cluster or an Amazon EMR Studio. Tags make it easier to associate resources 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. For example, a cluster identifier or an Amazon EMR Studio ID.

    • Tags — (Array<map>)

      A list of tags to associate with a resource. 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 that a step will be canceled, even if the request is successfully submitted. When you use Amazon EMR versions 5.28.0 and later, you can cancel steps that are in a PENDING or RUNNING state. In earlier versions of Amazon EMR, you can only cancel steps that are in a PENDING state.

Service Reference:

Examples:

Calling the cancelSteps operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  StepIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  StepCancellationOption: SEND_INTERRUPT | TERMINATE_PROCESS
};
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 the specified steps that 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.

    • StepCancellationOption — (String)

      The option to choose to cancel RUNNING steps. By default, the value is SEND_INTERRUPT.

      Possible values include:
      • "SEND_INTERRUPT"
      • "TERMINATE_PROCESS"

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.

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

Creates a new Amazon EMR Studio.

Service Reference:

Examples:

Calling the createStudio operation

var params = {
  AuthMode: SSO | IAM, /* required */
  DefaultS3Location: 'STRING_VALUE', /* required */
  EngineSecurityGroupId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  ServiceRole: 'STRING_VALUE', /* required */
  SubnetIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  VpcId: 'STRING_VALUE', /* required */
  WorkspaceSecurityGroupId: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  IdpAuthUrl: 'STRING_VALUE',
  IdpRelayStateParameterName: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ],
  UserRole: 'STRING_VALUE'
};
emr.createStudio(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)

      A descriptive name for the Amazon EMR Studio.

    • Description — (String)

      A detailed description of the Amazon EMR Studio.

    • AuthMode — (String)

      Specifies whether the Studio authenticates users using IAM or Amazon Web Services SSO.

      Possible values include:
      • "SSO"
      • "IAM"
    • VpcId — (String)

      The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the Studio.

    • SubnetIds — (Array<String>)

      A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can have a maximum of 5 subnets. The subnets must belong to the VPC specified by VpcId. Studio users can create a Workspace in any of the specified subnets.

    • ServiceRole — (String)

      The IAM role that the Amazon EMR Studio assumes. The service role provides a way for Amazon EMR Studio to interoperate with other Amazon Web Services services.

    • UserRole — (String)

      The IAM user role that users and groups assume when logged in to an Amazon EMR Studio. Only specify a UserRole when you use Amazon Web Services SSO authentication. The permissions attached to the UserRole can be scoped down for each user or group using session policies.

    • WorkspaceSecurityGroupId — (String)

      The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound network traffic to resources in the Engine security group, and it must be in the same VPC specified by VpcId.

    • EngineSecurityGroupId — (String)

      The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network traffic from the Workspace security group, and it must be in the same VPC specified by VpcId.

    • DefaultS3Location — (String)

      The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.

    • IdpAuthUrl — (String)

      The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM authentication and want to let federated users log in to a Studio with the Studio URL and credentials from your IdP. Amazon EMR Studio redirects users to this endpoint to enter credentials.

    • IdpRelayStateParameterName — (String)

      The name that your identity provider (IdP) uses for its RelayState parameter. For example, RelayState or TargetSource. Specify this value when you use IAM authentication and want to let federated users log in to a Studio using the Studio URL. The RelayState parameter differs by IdP.

    • Tags — (Array<map>)

      A list of tags to associate with the Amazon EMR Studio. 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. The data object has the following properties:

      • StudioId — (String)

        The ID of the Amazon EMR Studio.

      • Url — (String)

        The unique Studio access URL.

Returns:

  • (AWS.Request)

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

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

Maps a user or group to the Amazon EMR Studio specified by StudioId, and applies a session policy to refine Studio permissions for that user or group. Use CreateStudioSessionMapping to assign users to a Studio when you use Amazon Web Services SSO authentication. For instructions on how to assign users to a Studio when you use IAM authentication, see Assign a user or group to your EMR Studio.

Service Reference:

Examples:

Calling the createStudioSessionMapping operation

var params = {
  IdentityType: USER | GROUP, /* required */
  SessionPolicyArn: 'STRING_VALUE', /* required */
  StudioId: 'STRING_VALUE', /* required */
  IdentityId: 'STRING_VALUE',
  IdentityName: 'STRING_VALUE'
};
emr.createStudioSessionMapping(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: {})
    • StudioId — (String)

      The ID of the Amazon EMR Studio to which the user or group will be mapped.

    • IdentityId — (String)

      The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store. For more information, see UserId and GroupId in the Amazon Web Services SSO Identity Store API Reference. Either IdentityName or IdentityId must be specified, but not both.

    • IdentityName — (String)

      The name of the user or group. For more information, see UserName and DisplayName in the Amazon Web Services SSO Identity Store API Reference. Either IdentityName or IdentityId must be specified, but not both.

    • IdentityType — (String)

      Specifies whether the identity to map to the Amazon EMR Studio is a user or a group.

      Possible values include:
      • "USER"
      • "GROUP"
    • SessionPolicyArn — (String)

      The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role. For more information, see Create an EMR Studio User Role with Session Policies.

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.

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.

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

Removes an Amazon EMR Studio from the Studio metadata store.

Service Reference:

Examples:

Calling the deleteStudio operation

var params = {
  StudioId: 'STRING_VALUE' /* required */
};
emr.deleteStudio(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: {})
    • StudioId — (String)

      The ID of the Amazon EMR Studio.

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.

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

Removes a user or group from an Amazon EMR Studio.

Service Reference:

Examples:

Calling the deleteStudioSessionMapping operation

var params = {
  IdentityType: USER | GROUP, /* required */
  StudioId: 'STRING_VALUE', /* required */
  IdentityId: 'STRING_VALUE',
  IdentityName: 'STRING_VALUE'
};
emr.deleteStudioSessionMapping(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: {})
    • StudioId — (String)

      The ID of the Amazon EMR Studio.

    • IdentityId — (String)

      The globally unique identifier (GUID) of the user or group to remove from the Amazon EMR Studio. For more information, see UserId and GroupId in the Amazon Web Services SSO Identity Store API Reference. Either IdentityName or IdentityId must be specified.

    • IdentityName — (String)

      The name of the user name or group to remove from the Amazon EMR Studio. For more information, see UserName and DisplayName in the Amazon Web Services SSO Store API Reference. Either IdentityName or IdentityId must be specified.

    • IdentityType — (String)

      Specifies whether the identity to delete from the Amazon EMR Studio is a user or a group.

      Possible values include:
      • "USER"
      • "GROUP"

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 run 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)

            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, and your account supports EC2-Classic, the cluster launches in EC2-Classic.

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

        • LogEncryptionKmsKeyId — (String)

          The KMS key used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

        • 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 such as 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 version 4.0 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 IAM principals in the Amazon Web Services account associated with the cluster. When true, IAM principals in the Amazon Web Services account can perform EMR cluster actions on the cluster that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions, regardless of IAM permissions policies attached to other IAM principals.

          The default value is true if a value is not provided when creating a cluster using the EMR API RunJobFlow command, the CLI create-cluster command, or the Amazon Web Services Management Console. IAM principals that are allowed to perform actions on the cluster can use the SetVisibleToAllUsers action to change the value on a running cluster. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

        • 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 Amazon EMR assumes in order to access Amazon Web Services 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 adds nodes to a deny list 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 Amazon 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 Amazon 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.

        • ClusterArn — (String)

          The Amazon Resource Name of the cluster.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.

        • StepConcurrencyLevel — (Integer)

          Specifies the number of steps that can be executed concurrently.

        • PlacementGroups — (Array<map>)

          Placement group configured for an Amazon EMR cluster.

          • InstanceRolerequired — (String)

            Role of the instance in the cluster.

            Starting with Amazon EMR version 5.23.0, the only supported instance role is MASTER.

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

            EC2 Placement Group strategy associated with instance role.

            Starting with Amazon EMR version 5.23.0, the only supported placement strategy is SPREAD for the MASTER instance role.

            Possible values include:
            • "SPREAD"
            • "PARTITION"
            • "CLUSTER"
            • "NONE"

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 no longer supported 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.

        • LogEncryptionKmsKeyId — (String)

          The KMS key used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

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

              If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.

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

            • CustomAmiId — (String)

              The custom AMI ID to use for the provisioned instance group.

          • NormalizedInstanceHours — (Integer)

            An approximation of the cost of the cluster, represented in m1.small/hours. This value is increased one time for every hour that an m1.small instance runs. Larger instances are weighted more heavily, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being increased incrementally four times. 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 connect to the master node using SSH.

          • 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 step fails. Use one of the following values:

              • TERMINATE_CLUSTER - Shuts down the cluster.

              • CANCEL_AND_WAIT - Cancels any pending steps and returns the cluster to the WAITING state.

              • CONTINUE - Continues to the next step in the queue.

              • TERMINATE_JOB_FLOW - Shuts down the cluster. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.

              If a cluster's StepConcurrencyLevel is greater than 1, do not use AddJobFlowSteps to submit a step with this parameter set to CANCEL_AND_WAIT or TERMINATE_CLUSTER. The step is not submitted and the action fails with a message that the ActionOnFailure setting is not valid.

              If you change a cluster's StepConcurrencyLevel to be greater than 1 while a step is running, the ActionOnFailure parameter may not behave as you expect. In this case, for a step that fails with this parameter set to CANCEL_AND_WAIT, pending steps and the running step are not canceled; for a step that fails with this parameter set to TERMINATE_CLUSTER, the cluster does not terminate.

              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 in Amazon S3 of the script to run during a bootstrap action.

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

          Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When true, IAM principals in the Amazon Web Services account can perform EMR cluster actions that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions, regardless of IAM permissions policies attached to other IAM principals.

          The default value is true if a value is not provided when creating a cluster using the EMR API RunJobFlow command, the CLI create-cluster command, or the Amazon Web Services Management Console. IAM principals that are authorized to perform actions on the cluster can use the SetVisibleToAllUsers action to change the value on a running cluster. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

        • 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 is assumed by the Amazon EMR service to access Amazon Web Services 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 adds nodes to a deny list 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.

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

Provides details of a notebook execution.

Service Reference:

Examples:

Calling the describeNotebookExecution operation

var params = {
  NotebookExecutionId: 'STRING_VALUE' /* required */
};
emr.describeNotebookExecution(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: {})
    • NotebookExecutionId — (String)

      The unique identifier of the notebook execution.

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:

      • NotebookExecution — (map)

        Properties of the notebook execution.

        • NotebookExecutionId — (String)

          The unique identifier of a notebook execution.

        • EditorId — (String)

          The unique identifier of the EMR Notebook that is used for the notebook execution.

        • ExecutionEngine — (map)

          The execution engine, such as an EMR cluster, used to run the EMR notebook and perform the notebook execution.

          • Idrequired — (String)

            The unique identifier of the execution engine. For an EMR cluster, this is the cluster ID.

          • Type — (String)

            The type of execution engine. A value of EMR specifies an EMR cluster.

            Possible values include:
            • "EMR"
          • MasterInstanceSecurityGroupId — (String)

            An optional unique ID of an EC2 security group to associate with the master instance of the EMR cluster for this notebook execution. For more information see Specifying EC2 Security Groups for EMR Notebooks in the EMR Management Guide.

        • NotebookExecutionName — (String)

          A name for the notebook execution.

        • NotebookParams — (String)

          Input parameters in JSON format passed to the EMR Notebook at runtime for execution.

        • Status — (String)

          The status of the notebook execution.

          • START_PENDING indicates that the cluster has received the execution request but execution has not begun.

          • STARTING indicates that the execution is starting on the cluster.

          • RUNNING indicates that the execution is being processed by the cluster.

          • FINISHING indicates that execution processing is in the final stages.

          • FINISHED indicates that the execution has completed without error.

          • FAILING indicates that the execution is failing and will not finish successfully.

          • FAILED indicates that the execution failed.

          • STOP_PENDING indicates that the cluster has received a StopNotebookExecution request and the stop is pending.

          • STOPPING indicates that the cluster is in the process of stopping the execution as a result of a StopNotebookExecution request.

          • STOPPED indicates that the execution stopped because of a StopNotebookExecution request.

          Possible values include:
          • "START_PENDING"
          • "STARTING"
          • "RUNNING"
          • "FINISHING"
          • "FINISHED"
          • "FAILING"
          • "FAILED"
          • "STOP_PENDING"
          • "STOPPING"
          • "STOPPED"
        • StartTime — (Date)

          The timestamp when notebook execution started.

        • EndTime — (Date)

          The timestamp when notebook execution ended.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the notebook execution.

        • OutputNotebookURI — (String)

          The location of the notebook execution's output file in Amazon S3.

        • LastStateChangeReason — (String)

          The reason for the latest status change of the notebook execution.

        • NotebookInstanceSecurityGroupId — (String)

          The unique identifier of the EC2 security group associated with the EMR Notebook instance. For more information see Specifying EC2 Security Groups for EMR Notebooks in the EMR Management Guide.

        • Tags — (Array<map>)

          A list of tags associated with a notebook execution. 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.

Returns:

  • (AWS.Request)

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

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

Provides EMR release label details, such as releases available the region where the API request is run, and the available applications for a specific EMR release label. Can also list EMR release versions that support a specified version of Spark.

Service Reference:

Examples:

Calling the describeReleaseLabel operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  ReleaseLabel: 'STRING_VALUE'
};
emr.describeReleaseLabel(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: {})
    • ReleaseLabel — (String)

      The target release label to be described.

    • NextToken — (String)

      The pagination token. Reserved for future use. Currently set to null.

    • MaxResults — (Integer)

      Reserved for future use. Currently set to null.

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:

      • ReleaseLabel — (String)

        The target release label described in the response.

      • Applications — (Array<map>)

        The list of applications available for the target release label. Name is the name of the application. Version is the concise version of the application.

        • Name — (String)

          The returned release label application name. For example, hadoop.

        • Version — (String)

          The returned release label application version. For example, 3.2.1.

      • NextToken — (String)

        The pagination token. Reserved for future use. Currently set to null.

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.

          If a cluster's StepConcurrencyLevel is greater than 1, do not use AddJobFlowSteps to submit a step with this parameter set to CANCEL_AND_WAIT or TERMINATE_CLUSTER. The step is not submitted and the action fails with a message that the ActionOnFailure setting is not valid.

          If you change a cluster's StepConcurrencyLevel to be greater than 1 while a step is running, the ActionOnFailure parameter may not behave as you expect. In this case, for a step that fails with this parameter set to CANCEL_AND_WAIT, pending steps and the running step are not canceled; for a step that fails with this parameter set to TERMINATE_CLUSTER, the cluster does not terminate.

          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 Amazon 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:

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

Returns details for the specified Amazon EMR Studio including ID, Name, VPC, Studio access URL, and so on.

Service Reference:

Examples:

Calling the describeStudio operation

var params = {
  StudioId: 'STRING_VALUE' /* required */
};
emr.describeStudio(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: {})
    • StudioId — (String)

      The Amazon EMR Studio ID.

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:

      • Studio — (map)

        The Amazon EMR Studio details.

        • StudioId — (String)

          The ID of the Amazon EMR Studio.

        • StudioArn — (String)

          The Amazon Resource Name (ARN) of the Amazon EMR Studio.

        • Name — (String)

          The name of the Amazon EMR Studio.

        • Description — (String)

          The detailed description of the Amazon EMR Studio.

        • AuthMode — (String)

          Specifies whether the Amazon EMR Studio authenticates users using IAM or Amazon Web Services SSO.

          Possible values include:
          • "SSO"
          • "IAM"
        • VpcId — (String)

          The ID of the VPC associated with the Amazon EMR Studio.

        • SubnetIds — (Array<String>)

          The list of IDs of the subnets associated with the Amazon EMR Studio.

        • ServiceRole — (String)

          The name of the IAM role assumed by the Amazon EMR Studio.

        • UserRole — (String)

          The name of the IAM role assumed by users logged in to the Amazon EMR Studio. A Studio only requires a UserRole when you use IAM authentication.

        • WorkspaceSecurityGroupId — (String)

          The ID of the Workspace security group associated with the Amazon EMR Studio. The Workspace security group allows outbound network traffic to resources in the Engine security group and to the internet.

        • EngineSecurityGroupId — (String)

          The ID of the Engine security group associated with the Amazon EMR Studio. The Engine security group allows inbound network traffic from resources in the Workspace security group.

        • Url — (String)

          The unique access URL of the Amazon EMR Studio.

        • CreationTime — (Date)

          The time the Amazon EMR Studio was created.

        • DefaultS3Location — (String)

          The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.

        • IdpAuthUrl — (String)

          Your identity provider's authentication endpoint. Amazon EMR Studio redirects federated users to this endpoint for authentication when logging in to a Studio with the Studio URL.

        • IdpRelayStateParameterName — (String)

          The name of your identity provider's RelayState parameter.

        • Tags — (Array<map>)

          A list of tags associated with the Amazon EMR Studio.

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

Returns:

  • (AWS.Request)

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

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

Returns the auto-termination policy for an Amazon EMR cluster.

Service Reference:

Examples:

Calling the getAutoTerminationPolicy operation

var params = {
  ClusterId: 'STRING_VALUE' /* required */
};
emr.getAutoTerminationPolicy(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 the Amazon EMR cluster for which the auto-termination policy will be fetched.

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:

      • AutoTerminationPolicy — (map)

        Specifies the auto-termination policy that is attached to an Amazon EMR cluster.

        • IdleTimeout — (Integer)

          Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

Returns:

  • (AWS.Request)

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

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

Returns the Amazon EMR block public access configuration for your Amazon Web Services account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.

Examples:

Calling the getBlockPublicAccessConfiguration operation

var params = {
};
emr.getBlockPublicAccessConfiguration(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: {})

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:

      • BlockPublicAccessConfiguration — (map)

        A configuration for Amazon EMR block public access. The configuration applies to all clusters created in your account for the current Region. The configuration specifies whether block public access is enabled. If block public access is enabled, security groups associated with the cluster cannot have rules that allow inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using PermittedPublicSecurityGroupRuleRanges in the BlockPublicAccessConfiguration. By default, Port 22 (SSH) is an exception, and public access is allowed on this port. You can change this by updating the block public access configuration to remove the exception.

        Note: For accounts that created clusters in a Region before November 25, 2019, block public access is disabled by default in that Region. To use this feature, you must manually enable and configure it. For accounts that did not create an EMR cluster in a Region before this date, block public access is enabled by default in that Region.
        • BlockPublicSecurityGroupRulesrequired — (Boolean)

          Indicates whether Amazon EMR block public access is enabled (true) or disabled (false). By default, the value is false for accounts that have created EMR clusters before July 2019. For accounts created after this, the default is true.

        • PermittedPublicSecurityGroupRuleRanges — (Array<map>)

          Specifies ports and port ranges that are permitted to have security group rules that allow inbound traffic from all public sources. For example, if Port 23 (Telnet) is specified for PermittedPublicSecurityGroupRuleRanges, Amazon EMR allows cluster creation if a security group associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or IPv6 port ::/0 as the source.

          By default, Port 22, which is used for SSH access to the cluster EC2 instances, is in the list of PermittedPublicSecurityGroupRuleRanges.

          • MinRangerequired — (Integer)

            The smallest port number in a specified range of port numbers.

          • MaxRange — (Integer)

            The smallest port number in a specified range of port numbers.

      • BlockPublicAccessConfigurationMetadata — (map)

        Properties that describe the Amazon Web Services principal that created the BlockPublicAccessConfiguration using the PutBlockPublicAccessConfiguration action as well as the date and time that the configuration was created. Each time a configuration for block public access is updated, Amazon EMR updates this metadata.

        • CreationDateTimerequired — (Date)

          The date and time that the configuration was created.

        • CreatedByArnrequired — (String)

          The Amazon Resource Name that created or last modified the configuration.

Returns:

  • (AWS.Request)

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

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

Fetches the attached managed scaling policy for an Amazon EMR cluster.

Service Reference:

Examples:

Calling the getManagedScalingPolicy operation

var params = {
  ClusterId: 'STRING_VALUE' /* required */
};
emr.getManagedScalingPolicy(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 the cluster for which the managed scaling policy will be fetched.

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:

      • ManagedScalingPolicy — (map)

        Specifies the managed scaling policy that is attached to an Amazon EMR cluster.

        • ComputeLimits — (map)

          The EC2 unit limits for a managed scaling policy. The managed scaling activity of a cluster is not allowed to go above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

          • UnitTyperequired — (String)

            The unit type used for specifying a managed scaling policy.

            Possible values include:
            • "InstanceFleetUnits"
            • "Instances"
            • "VCPU"
          • MinimumCapacityUnitsrequired — (Integer)

            The lower boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

          • MaximumCapacityUnitsrequired — (Integer)

            The upper boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

          • MaximumOnDemandCapacityUnits — (Integer)

            The upper boundary of On-Demand EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The On-Demand units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between On-Demand and Spot Instances.

          • MaximumCoreCapacityUnits — (Integer)

            The upper boundary of EC2 units for core node type in a cluster. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The core units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between core and task nodes.

Returns:

  • (AWS.Request)

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

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

Fetches mapping details for the specified Amazon EMR Studio and identity (user or group).

Service Reference:

Examples:

Calling the getStudioSessionMapping operation

var params = {
  IdentityType: USER | GROUP, /* required */
  StudioId: 'STRING_VALUE', /* required */
  IdentityId: 'STRING_VALUE',
  IdentityName: 'STRING_VALUE'
};
emr.getStudioSessionMapping(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: {})
    • StudioId — (String)

      The ID of the Amazon EMR Studio.

    • IdentityId — (String)

      The globally unique identifier (GUID) of the user or group. For more information, see UserId and GroupId in the Amazon Web Services SSO Identity Store API Reference. Either IdentityName or IdentityId must be specified.

    • IdentityName — (String)

      The name of the user or group to fetch. For more information, see UserName and DisplayName in the Amazon Web Services SSO Identity Store API Reference. Either IdentityName or IdentityId must be specified.

    • IdentityType — (String)

      Specifies whether the identity to fetch is a user or a group.

      Possible values include:
      • "USER"
      • "GROUP"

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:

      • SessionMapping — (map)

        The session mapping details for the specified Amazon EMR Studio and identity, including session policy ARN and creation time.

        • StudioId — (String)

          The ID of the Amazon EMR Studio.

        • IdentityId — (String)

          The globally unique identifier (GUID) of the user or group.

        • IdentityName — (String)

          The name of the user or group. For more information, see UserName and DisplayName in the Amazon Web Services SSO Identity Store API Reference.

        • IdentityType — (String)

          Specifies whether the identity mapped to the Amazon EMR Studio is a user or a group.

          Possible values include:
          • "USER"
          • "GROUP"
        • SessionPolicyArn — (String)

          The Amazon Resource Name (ARN) of the session policy associated with the user or group.

        • CreationTime — (Date)

          The time the session mapping was created.

        • LastModifiedTime — (Date)

          The time the session mapping was last modified.

Returns:

  • (AWS.Request)

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

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 Amazon Web Services 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 in unsorted order 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. Clusters that change state while this action runs may be not be returned as expected in the list of 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 run 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.

        • ClusterArn — (String)

          The Amazon Resource Name of the cluster.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.

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

          An array of specifications for the instance types that comprise an 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 Store (Amazon 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.

          • CustomAmiId — (String)

            The custom AMI ID to use for the instance type.

        • LaunchSpecifications — (map)

          Describes the launch specification for an instance fleet.

          • SpotSpecification — (map)

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

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

            • AllocationStrategy — (String)

              Specifies the strategy to use in launching Spot Instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

              Possible values include:
              • "capacity-optimized"
          • OnDemandSpecification — (map)

            The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.

            Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.
            • AllocationStrategyrequired — (String)

              Specifies the strategy to use in launching On-Demand instance fleets. Currently, the only option is lowest-price (the default), which launches the lowest price first.

              Possible values include:
              • "lowest-price"
            • CapacityReservationOptions — (map)

              The launch specification for On-Demand instances in the instance fleet, which determines the allocation strategy.

              • UsageStrategy — (String)

                Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

                If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price).

                If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand allocation strategy.

                Possible values include:
                • "use-capacity-reservations-first"
              • CapacityReservationPreference — (String)

                Indicates the instance's Capacity Reservation preferences. Possible preferences include:

                • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

                • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.

                Possible values include:
                • "open"
                • "none"
              • CapacityReservationResourceGroupArn — (String)

                The ARN of the Capacity Reservation resource group in which to run the instance.

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

          If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.

        • 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 Amazon 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, in five-minute increments, 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.

        • CustomAmiId — (String)

          The custom AMI ID to use for the provisioned instance group.

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

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

Provides summaries of all notebook executions. You can filter the list based on multiple criteria such as status, time range, and editor id. Returns a maximum of 50 notebook executions and a marker to track the paging of a longer notebook execution list across multiple ListNotebookExecution calls.

Service Reference:

Examples:

Calling the listNotebookExecutions operation

var params = {
  EditorId: 'STRING_VALUE',
  From: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  Marker: 'STRING_VALUE',
  Status: START_PENDING | STARTING | RUNNING | FINISHING | FINISHED | FAILING | FAILED | STOP_PENDING | STOPPING | STOPPED,
  To: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
emr.listNotebookExecutions(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: {})
    • EditorId — (String)

      The unique ID of the editor associated with the notebook execution.

    • Status — (String)

      The status filter for listing notebook executions.

      • START_PENDING indicates that the cluster has received the execution request but execution has not begun.

      • STARTING indicates that the execution is starting on the cluster.

      • RUNNING indicates that the execution is being processed by the cluster.

      • FINISHING indicates that execution processing is in the final stages.

      • FINISHED indicates that the execution has completed without error.

      • FAILING indicates that the execution is failing and will not finish successfully.

      • FAILED indicates that the execution failed.

      • STOP_PENDING indicates that the cluster has received a StopNotebookExecution request and the stop is pending.

      • STOPPING indicates that the cluster is in the process of stopping the execution as a result of a StopNotebookExecution request.

      • STOPPED indicates that the execution stopped because of a StopNotebookExecution request.

      Possible values include:
      • "START_PENDING"
      • "STARTING"
      • "RUNNING"
      • "FINISHING"
      • "FINISHED"
      • "FAILING"
      • "FAILED"
      • "STOP_PENDING"
      • "STOPPING"
      • "STOPPED"
    • From — (Date)

      The beginning of time range filter for listing notebook executions. The default is the timestamp of 30 days ago.

    • To — (Date)

      The end of time range filter for listing notebook executions. The default is the current timestamp.

    • Marker — (String)

      The pagination token, returned by a previous ListNotebookExecutions call, that indicates the start of the list for this ListNotebookExecutions call.

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:

      • NotebookExecutions — (Array<map>)

        A list of notebook executions.

        • NotebookExecutionId — (String)

          The unique identifier of the notebook execution.

        • EditorId — (String)

          The unique identifier of the editor associated with the notebook execution.

        • NotebookExecutionName — (String)

          The name of the notebook execution.

        • Status — (String)

          The status of the notebook execution.

          • START_PENDING indicates that the cluster has received the execution request but execution has not begun.

          • STARTING indicates that the execution is starting on the cluster.

          • RUNNING indicates that the execution is being processed by the cluster.

          • FINISHING indicates that execution processing is in the final stages.

          • FINISHED indicates that the execution has completed without error.

          • FAILING indicates that the execution is failing and will not finish successfully.

          • FAILED indicates that the execution failed.

          • STOP_PENDING indicates that the cluster has received a StopNotebookExecution request and the stop is pending.

          • STOPPING indicates that the cluster is in the process of stopping the execution as a result of a StopNotebookExecution request.

          • STOPPED indicates that the execution stopped because of a StopNotebookExecution request.

          Possible values include:
          • "START_PENDING"
          • "STARTING"
          • "RUNNING"
          • "FINISHING"
          • "FINISHED"
          • "FAILING"
          • "FAILED"
          • "STOP_PENDING"
          • "STOPPING"
          • "STOPPED"
        • StartTime — (Date)

          The timestamp when notebook execution started.

        • EndTime — (Date)

          The timestamp when notebook execution started.

      • Marker — (String)

        A pagination token that a subsequent ListNotebookExecutions can use to determine the next set of results to retrieve.

Returns:

  • (AWS.Request)

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

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

Retrieves release labels of EMR services in the region where the API is called.

Service Reference:

Examples:

Calling the listReleaseLabels operation

var params = {
  Filters: {
    Application: 'STRING_VALUE',
    Prefix: 'STRING_VALUE'
  },
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
emr.listReleaseLabels(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: {})
    • Filters — (map)

      Filters the results of the request. Prefix specifies the prefix of release labels to return. Application specifies the application (with/without version) of release labels to return.

      • Prefix — (String)

        Optional release label version prefix filter. For example, emr-5.

      • Application — (String)

        Optional release label application filter. For example, spark@2.1.0.

    • NextToken — (String)

      Specifies the next page of results. If NextToken is not specified, which is usually the case for the first request of ListReleaseLabels, the first page of results are determined by other filtering parameters or by the latest version. The ListReleaseLabels request fails if the identity (Amazon Web Services account ID) and all filtering parameters are different from the original request, or if the NextToken is expired or tampered with.

    • MaxResults — (Integer)

      Defines the maximum number of release labels to return in a single response. The default is 100.

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:

      • ReleaseLabels — (Array<String>)

        The returned release labels.

      • NextToken — (String)

        Used to paginate the next page of results if specified in the next ListReleaseLabels request.

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 or filter by StepStates. You can specify a maximum of 10 stepIDs. The CLI automatically paginates results to return a list greater than 50 steps. To return more than 50 steps using the CLI, specify a Marker, which is a pagination token that indicates the next set of steps to retrieve.

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. You can specify a maximum of ten Step IDs. The character constraint applies to the overall length of the array.

    • Marker — (String)

      The maximum number of steps that a single ListSteps action returns is 50. To return a longer list of steps, use multiple ListSteps actions along with the Marker parameter, which is a 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.

          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 Amazon 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 maximum number of steps that a single ListSteps action returns is 50. To return a longer list of steps, use multiple ListSteps actions along with the Marker parameter, which is a 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.

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

Returns a list of all Amazon EMR Studios associated with the Amazon Web Services account. The list includes details such as ID, Studio Access URL, and creation time for each Studio.

Service Reference:

Examples:

Calling the listStudios operation

var params = {
  Marker: 'STRING_VALUE'
};
emr.listStudios(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:

      • Studios — (Array<map>)

        The list of Studio summary objects.

        • StudioId — (String)

          The ID of the Amazon EMR Studio.

        • Name — (String)

          The name of the Amazon EMR Studio.

        • VpcId — (String)

          The ID of the Virtual Private Cloud (Amazon VPC) associated with the Amazon EMR Studio.

        • Description — (String)

          The detailed description of the Amazon EMR Studio.

        • Url — (String)

          The unique access URL of the Amazon EMR Studio.

        • AuthMode — (String)

          Specifies whether the Studio authenticates users using IAM or Amazon Web Services SSO.

          Possible values include:
          • "SSO"
          • "IAM"
        • CreationTime — (Date)

          The time when the Amazon EMR Studio was created.

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

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

Returns a list of all user or group session mappings for the Amazon EMR Studio specified by StudioId.

Service Reference:

Examples:

Calling the listStudioSessionMappings operation

var params = {
  IdentityType: USER | GROUP,
  Marker: 'STRING_VALUE',
  StudioId: 'STRING_VALUE'
};
emr.listStudioSessionMappings(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: {})
    • StudioId — (String)

      The ID of the Amazon EMR Studio.

    • IdentityType — (String)

      Specifies whether to return session mappings for users or groups. If not specified, the results include session mapping details for both users and groups.

      Possible values include:
      • "USER"
      • "GROUP"
    • 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:

      • SessionMappings — (Array<map>)

        A list of session mapping summary objects. Each object includes session mapping details such as creation time, identity type (user or group), and Amazon EMR Studio ID.

        • StudioId — (String)

          The ID of the Amazon EMR Studio.

        • IdentityId — (String)

          The globally unique identifier (GUID) of the user or group from the Amazon Web Services SSO Identity Store.

        • IdentityName — (String)

          The name of the user or group. For more information, see UserName and DisplayName in the Amazon Web Services SSO Identity Store API Reference.

        • IdentityType — (String)

          Specifies whether the identity mapped to the Amazon EMR Studio is a user or a group.

          Possible values include:
          • "USER"
          • "GROUP"
        • SessionPolicyArn — (String)

          The Amazon Resource Name (ARN) of the session policy associated with the user or group.

        • CreationTime — (Date)

          The time the session mapping was created.

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

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

Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.

Service Reference:

Examples:

Calling the modifyCluster operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  StepConcurrencyLevel: 'NUMBER_VALUE'
};
emr.modifyCluster(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.

    • StepConcurrencyLevel — (Integer)

      The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the ActionOnFailure setting may not behave as expected. For more information see Step$ActionOnFailure.

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:

      • StepConcurrencyLevel — (Integer)

        The number of steps that can be executed concurrently.

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 configuration parameters 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 modify.

      • 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, in five-minute increments, 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, in five-minute increments, 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.

      • ClusterArn — (String)

        The Amazon Resource Name (ARN) of the cluster.

Returns:

  • (AWS.Request)

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

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

Creates or updates an auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see Control cluster termination.

Service Reference:

Examples:

Calling the putAutoTerminationPolicy operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  AutoTerminationPolicy: {
    IdleTimeout: 'NUMBER_VALUE'
  }
};
emr.putAutoTerminationPolicy(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 the Amazon EMR cluster to which the auto-termination policy will be attached.

    • AutoTerminationPolicy — (map)

      Specifies the auto-termination policy to attach to the cluster.

      • IdleTimeout — (Integer)

        Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

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.

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

Creates or updates an Amazon EMR block public access configuration for your Amazon Web Services account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.

Examples:

Calling the putBlockPublicAccessConfiguration operation

var params = {
  BlockPublicAccessConfiguration: { /* required */
    BlockPublicSecurityGroupRules: true || false, /* required */
    PermittedPublicSecurityGroupRuleRanges: [
      {
        MinRange: 'NUMBER_VALUE', /* required */
        MaxRange: 'NUMBER_VALUE'
      },
      /* more items */
    ]
  }
};
emr.putBlockPublicAccessConfiguration(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: {})
    • BlockPublicAccessConfiguration — (map)

      A configuration for Amazon EMR block public access. The configuration applies to all clusters created in your account for the current Region. The configuration specifies whether block public access is enabled. If block public access is enabled, security groups associated with the cluster cannot have rules that allow inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using PermittedPublicSecurityGroupRuleRanges in the BlockPublicAccessConfiguration. By default, Port 22 (SSH) is an exception, and public access is allowed on this port. You can change this by updating BlockPublicSecurityGroupRules to remove the exception.

      Note: For accounts that created clusters in a Region before November 25, 2019, block public access is disabled by default in that Region. To use this feature, you must manually enable and configure it. For accounts that did not create an EMR cluster in a Region before this date, block public access is enabled by default in that Region.
      • BlockPublicSecurityGroupRulesrequired — (Boolean)

        Indicates whether Amazon EMR block public access is enabled (true) or disabled (false). By default, the value is false for accounts that have created EMR clusters before July 2019. For accounts created after this, the default is true.

      • PermittedPublicSecurityGroupRuleRanges — (Array<map>)

        Specifies ports and port ranges that are permitted to have security group rules that allow inbound traffic from all public sources. For example, if Port 23 (Telnet) is specified for PermittedPublicSecurityGroupRuleRanges, Amazon EMR allows cluster creation if a security group associated with the cluster has a rule that allows inbound traffic on Port 23 from IPv4 0.0.0.0/0 or IPv6 port ::/0 as the source.

        By default, Port 22, which is used for SSH access to the cluster EC2 instances, is in the list of PermittedPublicSecurityGroupRuleRanges.

        • MinRangerequired — (Integer)

          The smallest port number in a specified range of port numbers.

        • MaxRange — (Integer)

          The smallest port number in a specified range of port numbers.

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.

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

Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

Service Reference:

Examples:

Calling the putManagedScalingPolicy operation

var params = {
  ClusterId: 'STRING_VALUE', /* required */
  ManagedScalingPolicy: { /* required */
    ComputeLimits: {
      MaximumCapacityUnits: 'NUMBER_VALUE', /* required */
      MinimumCapacityUnits: 'NUMBER_VALUE', /* required */
      UnitType: InstanceFleetUnits | Instances | VCPU, /* required */
      MaximumCoreCapacityUnits: 'NUMBER_VALUE',
      MaximumOnDemandCapacityUnits: 'NUMBER_VALUE'
    }
  }
};
emr.putManagedScalingPolicy(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 an EMR cluster where the managed scaling policy is attached.

    • ManagedScalingPolicy — (map)

      Specifies the constraints for the managed scaling policy.

      • ComputeLimits — (map)

        The EC2 unit limits for a managed scaling policy. The managed scaling activity of a cluster is not allowed to go above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

        • UnitTyperequired — (String)

          The unit type used for specifying a managed scaling policy.

          Possible values include:
          • "InstanceFleetUnits"
          • "Instances"
          • "VCPU"
        • MinimumCapacityUnitsrequired — (Integer)

          The lower boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

        • MaximumCapacityUnitsrequired — (Integer)

          The upper boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

        • MaximumOnDemandCapacityUnits — (Integer)

          The upper boundary of On-Demand EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The On-Demand units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between On-Demand and Spot Instances.

        • MaximumCoreCapacityUnits — (Integer)

          The upper boundary of EC2 units for core node type in a cluster. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The core units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between core and task nodes.

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.

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.

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

Removes an auto-termination policy from an Amazon EMR cluster.

Service Reference:

Examples:

Calling the removeAutoTerminationPolicy operation

var params = {
  ClusterId: 'STRING_VALUE' /* required */
};
emr.removeAutoTerminationPolicy(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 the Amazon EMR cluster from which the auto-termination policy will be removed.

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.

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

Removes a managed scaling policy from a specified EMR cluster.

Service Reference:

Examples:

Calling the removeManagedScalingPolicy operation

var params = {
  ClusterId: 'STRING_VALUE' /* required */
};
emr.removeManagedScalingPolicy(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 the cluster from which the managed scaling policy will be removed.

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, such as a cluster or Amazon EMR Studio. Tags make it easier to associate resources 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. For example, a cluster identifier or an Amazon EMR Studio ID.

    • TagKeys — (Array<String>)

      A list of tag keys to remove from the 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 */
            ],
            CustomAmiId: 'STRING_VALUE',
            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: {
          OnDemandSpecification: {
            AllocationStrategy: lowest-price, /* required */
            CapacityReservationOptions: {
              CapacityReservationPreference: open | none,
              CapacityReservationResourceGroupArn: 'STRING_VALUE',
              UsageStrategy: use-capacity-reservations-first
            }
          },
          SpotSpecification: {
            TimeoutAction: SWITCH_TO_ON_DEMAND | TERMINATE_CLUSTER, /* required */
            TimeoutDurationMinutes: 'NUMBER_VALUE', /* required */
            AllocationStrategy: capacity-optimized,
            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 */
        ],
        CustomAmiId: 'STRING_VALUE',
        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',
  AutoTerminationPolicy: {
    IdleTimeout: 'NUMBER_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'
  },
  LogEncryptionKmsKeyId: 'STRING_VALUE',
  LogUri: 'STRING_VALUE',
  ManagedScalingPolicy: {
    ComputeLimits: {
      MaximumCapacityUnits: 'NUMBER_VALUE', /* required */
      MinimumCapacityUnits: 'NUMBER_VALUE', /* required */
      UnitType: InstanceFleetUnits | Instances | VCPU, /* required */
      MaximumCoreCapacityUnits: 'NUMBER_VALUE',
      MaximumOnDemandCapacityUnits: 'NUMBER_VALUE'
    }
  },
  NewSupportedProducts: [
    {
      Args: [
        'STRING_VALUE',
        /* more items */
      ],
      Name: 'STRING_VALUE'
    },
    /* more items */
  ],
  PlacementGroupConfigs: [
    {
      InstanceRole: MASTER | CORE | TASK, /* required */
      PlacementStrategy: SPREAD | PARTITION | CLUSTER | NONE
    },
    /* more items */
  ],
  ReleaseLabel: 'STRING_VALUE',
  RepoUpgradeOnBoot: SECURITY | NONE,
  ScaleDownBehavior: TERMINATE_AT_INSTANCE_HOUR | TERMINATE_AT_TASK_COMPLETION,
  SecurityConfiguration: 'STRING_VALUE',
  ServiceRole: 'STRING_VALUE',
  StepConcurrencyLevel: 'NUMBER_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.

    • LogEncryptionKmsKeyId — (String)

      The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR version 5.30.0 and later, excluding Amazon EMR 6.0.0.

    • 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 such as 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 version 4.0 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)

          If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.

        • 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, in five-minute increments, 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.

        • CustomAmiId — (String)

          The custom AMI ID to use for the provisioned instance group.

      • 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 Store (Amazon 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.

          • CustomAmiId — (String)

            The custom AMI ID to use for the instance type.

        • LaunchSpecifications — (map)

          The launch specification for the instance fleet.

          • SpotSpecification — (map)

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

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

            • AllocationStrategy — (String)

              Specifies the strategy to use in launching Spot Instance fleets. Currently, the only option is capacity-optimized (the default), which launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

              Possible values include:
              • "capacity-optimized"
          • OnDemandSpecification — (map)

            The launch specification for On-Demand Instances in the instance fleet, which determines the allocation strategy.

            Note: The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. On-Demand Instances allocation strategy is available in Amazon EMR version 5.12.1 and later.
            • AllocationStrategyrequired — (String)

              Specifies the strategy to use in launching On-Demand instance fleets. Currently, the only option is lowest-price (the default), which launches the lowest price first.

              Possible values include:
              • "lowest-price"
            • CapacityReservationOptions — (map)

              The launch specification for On-Demand instances in the instance fleet, which determines the allocation strategy.

              • UsageStrategy — (String)

                Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

                If you specify use-capacity-reservations-first, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price).

                If you do not specify a value, the fleet fulfills the On-Demand capacity according to the chosen On-Demand allocation strategy.

                Possible values include:
                • "use-capacity-reservations-first"
              • CapacityReservationPreference — (String)

                Indicates the instance's Capacity Reservation preferences. Possible preferences include:

                • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

                • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.

                Possible values include:
                • "open"
                • "none"
              • CapacityReservationResourceGroupArn — (String)

                The ARN of the Capacity Reservation resource group in which to run the instance.

      • Ec2KeyName — (String)

        The name of the EC2 key pair that can be used to connect to the master node using SSH 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. Defaults to true. For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide.

      • 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" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "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 and your account supports EC2-Classic, the cluster launches in EC2-Classic.

      • 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. If you specify EmrManagedMasterSecurityGroup, you must also specify EmrManagedSlaveSecurityGroup.

      • EmrManagedSlaveSecurityGroup — (String)

        The identifier of the Amazon EC2 security group for the core and task nodes. If you specify EmrManagedSlaveSecurityGroup, you must also specify EmrManagedMasterSecurityGroup.

      • 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 step fails. Use one of the following values:

        • TERMINATE_CLUSTER - Shuts down the cluster.

        • CANCEL_AND_WAIT - Cancels any pending steps and returns the cluster to the WAITING state.

        • CONTINUE - Continues to the next step in the queue.

        • TERMINATE_JOB_FLOW - Shuts down the cluster. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.

        If a cluster's StepConcurrencyLevel is greater than 1, do not use AddJobFlowSteps to submit a step with this parameter set to CANCEL_AND_WAIT or TERMINATE_CLUSTER. The step is not submitted and the action fails with a message that the ActionOnFailure setting is not valid.

        If you change a cluster's StepConcurrencyLevel to be greater than 1 while a step is running, the ActionOnFailure parameter may not behave as you expect. In this case, for a step that fails with this parameter set to CANCEL_AND_WAIT, pending steps and the running step are not canceled; for a step that fails with this parameter set to TERMINATE_CLUSTER, the cluster does not terminate.

        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 in Amazon S3 of the script to run during a bootstrap action.

        • 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 Analytics 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)

      Set this value to true so that IAM principals in the Amazon Web Services account associated with the cluster can perform EMR actions on the cluster that their IAM policies allow. This value defaults to true for clusters created using the EMR API or the CLI create-cluster command.

      When set to false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

    • 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 Amazon EMR assumes in order to access Amazon Web Services 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 adds nodes to a deny list 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 Amazon 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 Amazon 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.

    • StepConcurrencyLevel — (Integer)

      Specifies the number of steps that can be executed concurrently. The default value is 1. The maximum value is 256.

    • ManagedScalingPolicy — (map)

      The specified managed scaling policy for an Amazon EMR cluster.

      • ComputeLimits — (map)

        The EC2 unit limits for a managed scaling policy. The managed scaling activity of a cluster is not allowed to go above or below these limits. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

        • UnitTyperequired — (String)

          The unit type used for specifying a managed scaling policy.

          Possible values include:
          • "InstanceFleetUnits"
          • "Instances"
          • "VCPU"
        • MinimumCapacityUnitsrequired — (Integer)

          The lower boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

        • MaximumCapacityUnitsrequired — (Integer)

          The upper boundary of EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. Managed scaling activities are not allowed beyond this boundary. The limit only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

        • MaximumOnDemandCapacityUnits — (Integer)

          The upper boundary of On-Demand EC2 units. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The On-Demand units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between On-Demand and Spot Instances.

        • MaximumCoreCapacityUnits — (Integer)

          The upper boundary of EC2 units for core node type in a cluster. It is measured through vCPU cores or instances for instance groups and measured through units for instance fleets. The core units are not allowed to scale beyond this boundary. The parameter is used to split capacity allocation between core and task nodes.

    • PlacementGroupConfigs — (Array<map>)

      The specified placement group configuration for an Amazon EMR cluster.

      • InstanceRolerequired — (String)

        Role of the instance in the cluster.

        Starting with Amazon EMR version 5.23.0, the only supported instance role is MASTER.

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

        EC2 Placement Group strategy associated with instance role.

        Starting with Amazon EMR version 5.23.0, the only supported placement strategy is SPREAD for the MASTER instance role.

        Possible values include:
        • "SPREAD"
        • "PARTITION"
        • "CLUSTER"
        • "NONE"
    • AutoTerminationPolicy — (map)

      An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see Control cluster termination.

      • IdleTimeout — (Integer)

        Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

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)

        A unique identifier for the job flow.

      • ClusterArn — (String)

        The Amazon Resource Name (ARN) of the cluster.

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 the Cluster$VisibleToAllUsers value for an EMR cluster. When true, IAM principals in the Amazon Web Services account can perform EMR cluster actions that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions on the cluster, regardless of IAM permissions policies attached to other IAM principals.

This action works on running clusters. When you create a cluster, use the RunJobFlowInput$VisibleToAllUsers parameter.

For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

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>)

      The unique identifier of the job flow (cluster).

    • VisibleToAllUsers — (Boolean)

      A value of true indicates that an IAM principal in the Amazon Web Services account can perform EMR actions on the cluster that the IAM policies attached to the principal allow. A value of false indicates that only the IAM principal that created the cluster and the Amazon Web Services root user can perform EMR actions on the 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.

Returns:

  • (AWS.Request)

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

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

Starts a notebook execution.

Service Reference:

Examples:

Calling the startNotebookExecution operation

var params = {
  EditorId: 'STRING_VALUE', /* required */
  ExecutionEngine: { /* required */
    Id: 'STRING_VALUE', /* required */
    MasterInstanceSecurityGroupId: 'STRING_VALUE',
    Type: EMR
  },
  RelativePath: 'STRING_VALUE', /* required */
  ServiceRole: 'STRING_VALUE', /* required */
  NotebookExecutionName: 'STRING_VALUE',
  NotebookInstanceSecurityGroupId: 'STRING_VALUE',
  NotebookParams: 'STRING_VALUE',
  Tags: [
    {
      Key: 'STRING_VALUE',
      Value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
emr.startNotebookExecution(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: {})
    • EditorId — (String)

      The unique identifier of the EMR Notebook to use for notebook execution.

    • RelativePath — (String)

      The path and file name of the notebook file for this execution, relative to the path specified for the EMR Notebook. For example, if you specify a path of s3://MyBucket/MyNotebooks when you create an EMR Notebook for a notebook with an ID of e-ABCDEFGHIJK1234567890ABCD (the EditorID of this request), and you specify a RelativePath of my_notebook_executions/notebook_execution.ipynb, the location of the file for the notebook execution is s3://MyBucket/MyNotebooks/e-ABCDEFGHIJK1234567890ABCD/my_notebook_executions/notebook_execution.ipynb.

    • NotebookExecutionName — (String)

      An optional name for the notebook execution.

    • NotebookParams — (String)

      Input parameters in JSON format passed to the EMR Notebook at runtime for execution.

    • ExecutionEngine — (map)

      Specifies the execution engine (cluster) that runs the notebook execution.

      • Idrequired — (String)

        The unique identifier of the execution engine. For an EMR cluster, this is the cluster ID.

      • Type — (String)

        The type of execution engine. A value of EMR specifies an EMR cluster.

        Possible values include:
        • "EMR"
      • MasterInstanceSecurityGroupId — (String)

        An optional unique ID of an EC2 security group to associate with the master instance of the EMR cluster for this notebook execution. For more information see Specifying EC2 Security Groups for EMR Notebooks in the EMR Management Guide.

    • ServiceRole — (String)

      The name or ARN of the IAM role that is used as the service role for Amazon EMR (the EMR role) for the notebook execution.

    • NotebookInstanceSecurityGroupId — (String)

      The unique identifier of the Amazon EC2 security group to associate with the EMR Notebook for this notebook execution.

    • Tags — (Array<map>)

      A list of tags associated with a notebook execution. 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. The data object has the following properties:

      • NotebookExecutionId — (String)

        The unique identifier of the notebook execution.

Returns:

  • (AWS.Request)

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

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

Stops a notebook execution.

Service Reference:

Examples:

Calling the stopNotebookExecution operation

var params = {
  NotebookExecutionId: 'STRING_VALUE' /* required */
};
emr.stopNotebookExecution(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: {})
    • NotebookExecutionId — (String)

      The unique identifier of the notebook execution.

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 shut down.

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.

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

Updates an Amazon EMR Studio configuration, including attributes such as name, description, and subnets.

Service Reference:

Examples:

Calling the updateStudio operation

var params = {
  StudioId: 'STRING_VALUE', /* required */
  DefaultS3Location: 'STRING_VALUE',
  Description: 'STRING_VALUE',
  Name: 'STRING_VALUE',
  SubnetIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
emr.updateStudio(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: {})
    • StudioId — (String)

      The ID of the Amazon EMR Studio to update.

    • Name — (String)

      A descriptive name for the Amazon EMR Studio.

    • Description — (String)

      A detailed description to assign to the Amazon EMR Studio.

    • SubnetIds — (Array<String>)

      A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.

    • DefaultS3Location — (String)

      The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.

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.

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

Updates the session policy attached to the user or group for the specified Amazon EMR Studio.

Service Reference:

Examples:

Calling the updateStudioSessionMapping operation

var params = {
  IdentityType: USER | GROUP, /* required */
  SessionPolicyArn: 'STRING_VALUE', /* required */
  StudioId: 'STRING_VALUE', /* required */
  IdentityId: 'STRING_VALUE',
  IdentityName: 'STRING_VALUE'
};
emr.updateStudioSessionMapping(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: {})
    • StudioId — (String)

      The ID of the Amazon EMR Studio.

    • IdentityId — (String)

      The globally unique identifier (GUID) of the user or group. For more information, see UserId and GroupId in the Amazon Web Services SSO Identity Store API Reference. Either IdentityName or IdentityId must be specified.

    • IdentityName — (String)

      The name of the user or group to update. For more information, see UserName and DisplayName in the Amazon Web Services SSO Identity Store API Reference. Either IdentityName or IdentityId must be specified.

    • IdentityType — (String)

      Specifies whether the identity to update is a user or a group.

      Possible values include:
      • "USER"
      • "GROUP"
    • SessionPolicyArn — (String)

      The Amazon Resource Name (ARN) of the session policy to associate with the specified user or group.

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 run 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)

            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, and your account supports EC2-Classic, the cluster launches in EC2-Classic.

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

        • LogEncryptionKmsKeyId — (String)

          The KMS key used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

        • 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 such as 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 version 4.0 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 IAM principals in the Amazon Web Services account associated with the cluster. When true, IAM principals in the Amazon Web Services account can perform EMR cluster actions on the cluster that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions, regardless of IAM permissions policies attached to other IAM principals.

          The default value is true if a value is not provided when creating a cluster using the EMR API RunJobFlow command, the CLI create-cluster command, or the Amazon Web Services Management Console. IAM principals that are allowed to perform actions on the cluster can use the SetVisibleToAllUsers action to change the value on a running cluster. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

        • 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 Amazon EMR assumes in order to access Amazon Web Services 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 adds nodes to a deny list 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 Amazon 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 Amazon 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.

        • ClusterArn — (String)

          The Amazon Resource Name of the cluster.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.

        • StepConcurrencyLevel — (Integer)

          Specifies the number of steps that can be executed concurrently.

        • PlacementGroups — (Array<map>)

          Placement group configured for an Amazon EMR cluster.

          • InstanceRolerequired — (String)

            Role of the instance in the cluster.

            Starting with Amazon EMR version 5.23.0, the only supported instance role is MASTER.

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

            EC2 Placement Group strategy associated with instance role.

            Starting with Amazon EMR version 5.23.0, the only supported placement strategy is SPREAD for the MASTER instance role.

            Possible values include:
            • "SPREAD"
            • "PARTITION"
            • "CLUSTER"
            • "NONE"

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.

          If a cluster's StepConcurrencyLevel is greater than 1, do not use AddJobFlowSteps to submit a step with this parameter set to CANCEL_AND_WAIT or TERMINATE_CLUSTER. The step is not submitted and the action fails with a message that the ActionOnFailure setting is not valid.

          If you change a cluster's StepConcurrencyLevel to be greater than 1 while a step is running, the ActionOnFailure parameter may not behave as you expect. In this case, for a step that fails with this parameter set to CANCEL_AND_WAIT, pending steps and the running step are not canceled; for a step that fails with this parameter set to TERMINATE_CLUSTER, the cluster does not terminate.

          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 Amazon 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 run 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)

            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, and your account supports EC2-Classic, the cluster launches in EC2-Classic.

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

        • LogEncryptionKmsKeyId — (String)

          The KMS key used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.

        • 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 such as 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 version 4.0 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 IAM principals in the Amazon Web Services account associated with the cluster. When true, IAM principals in the Amazon Web Services account can perform EMR cluster actions on the cluster that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions, regardless of IAM permissions policies attached to other IAM principals.

          The default value is true if a value is not provided when creating a cluster using the EMR API RunJobFlow command, the CLI create-cluster command, or the Amazon Web Services Management Console. IAM principals that are allowed to perform actions on the cluster can use the SetVisibleToAllUsers action to change the value on a running cluster. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

        • 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 Amazon EMR assumes in order to access Amazon Web Services 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 adds nodes to a deny list 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 Amazon 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 Amazon 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.

        • ClusterArn — (String)

          The Amazon Resource Name of the cluster.

        • OutpostArn — (String)

          The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.

        • StepConcurrencyLevel — (Integer)

          Specifies the number of steps that can be executed concurrently.

        • PlacementGroups — (Array<map>)

          Placement group configured for an Amazon EMR cluster.

          • InstanceRolerequired — (String)

            Role of the instance in the cluster.

            Starting with Amazon EMR version 5.23.0, the only supported instance role is MASTER.

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

            EC2 Placement Group strategy associated with instance role.

            Starting with Amazon EMR version 5.23.0, the only supported placement strategy is SPREAD for the MASTER instance role.

            Possible values include:
            • "SPREAD"
            • "PARTITION"
            • "CLUSTER"
            • "NONE"

Returns:

  • (AWS.Request)

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

See Also: