Saturday, 28 October 2017

Single EC2 Instance Part 5 - CloudWatch Alarm

We are now adding a CloudWatch alarm for our client's EC2 instance.

"Services", "EC2", "Instances", select the client's EC2 instance.
Go to "Monitoring" tab, click "Create Alarm".
Tick "Take the action". Choose "Recover this instance".
It will then auto-choose the correct type of check (which is "Status Check Failed (System)").
Click "Create Alarm".
Alarm created. Click "Close".
At the beginning, the alarm may display a "insufficient data" warning.
It can be safely ignored as the alarm has only just started collecting data.
After a few minutes, it should be "OK".
For the curious, more details about the CloudWatch alarm that we have just created.

There is no way to emulate a "Status Check Failed (System)". So we have to trust Amazon that the alarm can recover the EC2 instance. This method of making an EC2 instance highly-available is taken from here.

Next, backup and restore...

Part 6 - IAM Role

Single EC2 Instance - Table of Contents