Menu
Amazon EMR
Management Guide

Monitor CloudWatch Events

Amazon EMR tracks events and keeps information about them for up to seven days. Changes in the state of clusters, instance groups, automatic scaling policies, and steps cause an event to be recorded. Each event has information such as the date and time the event occurred, along with further detail about the event, such as the cluster or instance group affected.

The following table lists Amazon EMR events, along with the state or state change that the event indicates, the severity of the event, and event messages. Each event is represented as a JSON object that is sent automatically to an event stream. The JSON object includes further detail about the event. The JSON object is particularly important when you set up rules for event processing using CloudWatch Events because rules seek to match patterns in the JSON object. For more information, see Events and Event Patterns and Amazon EMR Events in the Amazon CloudWatch Events User Guide.

Cluster Events

State or State Change Severity Message

STARTING

INFO

Amazon EMR cluster %s (%s) was requested at [time] and is being created.

STARTING

INFO

Note

Applies only to clusters with the instance fleets configuration and multiple subnets selected within a VPC.

Amazon EMR cluster %s (%n) is being created in subnet (%s) in VPC (%) in availability zone (%), which was chosen from the specified VPC options.

STARTING

INFO

Note

Applies only to clusters with the instance fleets configuration and multiple Availability Zones selected within EC2-Classic.

Amazon EMR cluster %s (%n) is being created in availability zone (%), which was chosen from the specified availability zone options.

RUNNING

INFO

Amazon EMR cluster %s (%s) began running steps at [time].

WAITING

INFO

Amazon EMR cluster %s (%s) was created at [time] and is ready for use.

—or—

Amazon EMR cluster %s (%s) finished running all pending steps at [time].

Note

A cluster in the WAITING state may nevertheless be processing jobs.

TERMINATED

The severity depends on the reason for the state change, as shown in the following:

  • CRITICAL if the cluster terminated with any of the following state change reasons: INTERNAL_ERROR, VALIDATION_ERROR, INSTANCE_FALURE, BOOTSTRAP_FAILURE, or STEP_FAILURE.

  • INFO if the cluster terminated with any of the following state change reasons: USER_REQUEST or ALL_STEPS_COMPLETED.

Amazon EMR Cluster %s (%s) has terminated at [time] with a reason of [StateChangeReason:Code].

TERMINATED_WITH_ERRORS

CRITICAL

Amazon EMR Cluster %s (%s) has terminated with errors at [time] with a reason of [StateChangeReason:Code].

Instance Fleet Events

Note

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

State or State Change Severity Message

From PROVISIONING to WAITING

INFO

Provisioning for instance fleet %s in Amazon EMR cluster %s (%n) is complete. Provisioning started at %t and took %d minutes. The instance fleet now has On-Demand capacity of num and Spot capacity of num. Target On-Demand capacity was num, and target Spot capacity was num.

From WAITING to RESIZING

INFO

A resize for instance fleet %s in Amazon EMR cluster %s (%n) started at %s. The instance fleet is resizing from an On-Demand capacity of num to a target of num, and from a Spot capacity of num to a target of num.

From RESIZING to WAITING

INFO

The resizing operation for instance fleet %s in Amazon EMR cluster %s (%n) is complete. The resize started at %t and took %d minutes. The instance fleet now has On-Demand capacity of XX and Spot capacity of YY. Target On-Demand capacity was XX and target Spot capacity was ZZ.

From RESIZING to WAITING

WARN

The resizing operation for instance fleet %s in Amazon EMR cluster %s (%n) has reached the timeout and stopped. The resize started at %t and stopped after %d minutes. The instance fleet now has On-Demand capacity of XX and Spot capacity of YY. Target On-Demand capacity was XX and target Spot capacity was ZZ.

Instance Group Events

State or State Change Severity Message

From RESIZING to RUNNING

INFO

The resizing operation for instance group %s in Amazon EMR cluster %s (%s) is complete. It now has an instance count of %d. The resize started at %s and took %d minutes to complete.

From RUNNING to RESIZING

INFO

A resize for instance group %s in Amazon EMR cluster %s (%s) started at %s. It is resizing from an instance count of %d to %d.

Automatic Scaling Policy Events

State or State Change Severity Message

PENDING

INFO

An Auto Scaling policy was added to instance group %s in Amazon EMR cluster %s (%s) at [time]. The policy is pending attachment.

—or—

The Auto Scaling policy for instance group %s in Amazon EMR cluster %s (%s) was updated at [time]. The policy is pending attachment.

ATTACHED

INFO

The Auto Scaling policy for instance group %s in Amazon EMR cluster %s (%s) was attached at [time].

DETACHED

INFO

The Auto Scaling policy for instance group %s in Amazon EMR cluster %s (%s) was detached at [time].

FAILED

ERROR

The Auto Scaling policy for instance group %s in Amazon EMR cluster %s (%s) could not attach and failed at [time].

—or—

The Auto Scaling policy for instance group %s in Amazon EMR cluster %s (%s) could not detatch and failed at [time].

Step Events

State or State Change Severity Message

PENDING

INFO

Step [stepId] (step name) was added to Amazon EMR cluster %s (%s) at [time] and is pending execution.

CANCEL_PENDING

WARN

Step [stepId] (step name) in Amazon EMR cluster %s (%s) was cancelled at [time] and is pending cancellation.

RUNNING

INFO

Step [stepId] (step name) in Amazon EMR cluster %s (%s) started running at [time].

COMPLETED

INFO

Step [stepId] (step name) in Amazon EMR cluster %s (%s) completed execution at [time]. The step started running at %s and took %d minutes to complete.

CANCELLED

WARN

Cancellation request has succeeded for cluster step [stepId] (step name) in Amazon EMR cluster %s (%s) at [time], and the step is now cancelled.

FAILED

ERROR

Step [stepId] (step name) in Amazon EMR cluster %s (%s) failed at [time].

Viewing Events Using the Amazon EMR Console

For each cluster, you can view a simple list of events in the details pane, which lists events in descending order of occurrence. You can also view all events for all clusters in a region in descending order of occurrence.

Note

If you don't want a user to see all cluster events for a region, add a statement that denies permission ("Effect": "Deny") for the elasticmapreduce:ViewEventsFromAllClustersInConsole action to a policy that is attached to the user.

To view events for all clusters in a region

  1. Open the Amazon EMR console at https://console.aws.amazon.com/elasticmapreduce/.

  2. Choose Events.

To view events for a particular cluster

  1. Open the Amazon EMR console at https://console.aws.amazon.com/elasticmapreduce/.

  2. Choose Cluster List, select a cluster, and then choose View details.

  3. Choose Events in the cluster details pane.

    
								Amazon EMR events viewed in the cluster details pane.

Creating Rules for Amazon EMR Events Using CloudWatch

Amazon EMR automatically sends events to a CloudWatch event stream. You can create rules that match events according to a specified pattern, and route the events to targets to take action, such as sending an email notification. Patterns are matched against the event JSON object. For more information about Amazon EMR event details, see Amazon EMR Events in the Amazon CloudWatch Events User Guide.

To create a rule for an Amazon EMR event using the CloudWatch console

  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. In the navigation pane, choose Rules, Create rule.

  3. For Event source, choose Amazon EMR.

  4. Choose event states and other details according to your requirements for event handling. To create a rule by modifying the JSON according to the guidelines in Events and Event Patterns, choose Show advanced options, edit.

  5. Select a target and add additional targets according to your requirements for event handling.

  6. Choose Configure details, provide rule definition details, and then choose Create rule.