Amazon CloudWatch Events
User Guide

Tutorial: Log State Changes of Amazon EC2 Instances

In the example in this tutorial, you create a rule causing state-change notifications in Amazon EC2 to be logged in CloudWatch Logs.

To create a rule to log Amazon EC2 state-change notifications in CloudWatch Logs

  1. Open the CloudWatch console at

  2. In the navigation pane, choose Events and then Create rule.

  3. For Event Source, do the following:

    1. Choose Event Pattern.

    2. For Service Name, choose EC2.

    3. For Event Type, choose EC2 Instance State-change Notification.

  4. For Targets, choose Add target. In the list of services, choose CloudWatch log group.

  5. For Log Group, enter a name for the log group to receive the state-change notifications.

  6. Choose Configure details.

  7. For Rule definition, enter a name and description for the rule.

  8. Choose Create rule.