note: Setting up EC2 Alarm on AWS SNS (based on AWS Cloud watch data) - Yosh777jp/ec2_alarm_config GitHub Wiki
note: For setting up EC2 Alarm on AWS Cloud watch
Create Alarm. before that create SNS.
create subscription
Create Alarm on EC2
You can configure the alarm to take a specific action when it is triggered. The available actions include:
Recover - Recovers the instance onto a new underlying host. Recover is required for System Health Check failures. A recovered instance is identical to the original instance, including the instance ID, private IP addresses, Elastic IP addresses, and all instance metadata. Reboot - Reboot is equivalent to an operating system reboot. The instance is restarted on the same underlying host. Reboot is recommended for Instance Health Check failures. Stop - The instance is stopped. Data stored in the RAM or the instance store volumes is lost. The instance can be restarted at any time. Terminate - The instance is permanently deleted. You can't connect to or start the instance after it has been terminated. Data on any instance store volumes that are associated with that instance is deleted. The instance cannot be terminated if termination protection is enabled.
then save