Niamh shows you how to
set up automatic recovery
for your EC2 instance


I want to set up automatic recovery of an Amazon Elastic Compute Cloud (Amazon EC2) instance using Amazon CloudWatch. How can I do this?

If your instance fails a system status check, you can use CloudWatch alarm actions to automatically reboot or recover it. If you terminated your instance, it can't be recovered.

Note: The CloudWatch recovery option works only for system check failures, not for instance status-check failures. The recover option is supported only for instances that meet certain criteria. For more information, see Recover Your Instance.

If your instance fails a status check, you might need to reboot the instance or make configuration changes. For more information, see Types of Status Checks.

To configure a CloudWatch alarm action to automatically recover your instance

1.   In the Amazon EC2 console, choose Instances in the navigation pane, and then select the instance that you want to configure.

2.   Choose Actions, CloudWatch Monitoring, Add/Edit Alarms, and then choose Create Alarm.

3.   Choose Create topic.

4.   For Send a notification to field, type a topic name.

5.   For With these recipients field, type the email address.
Note: The SNS topic or email address receives a subscription email that must be confirmed within three days. Notifications are sent only to confirmed addresses.

6.   Choose Take the action, and then choose Recover.
Note: You can also choose Stop, Terminate, or Reboot.

7.   Choose your constraints, and then choose Create Alarm.

For additional information, see Create Alarms That Stop, Terminate, Reboot, or Recover an Instance.

Note: Be sure that the user who configured the alarm has AWS Identity and Access Management (IAM) permissions to stop and start the instance. For more information, see Creating IAM Roles.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2017-08-16

Updated: 2018-05-24