hi I'm ace a cloud support engineer here
at the AWS office in Dublin sometimes
customers asked me hi can you set up an
automatic recovery for your instance in
cloud watch to start let's describe what
auto recovery is and when you use it to
make sure your instance is healthy the
ec2 monitoring system constantly checks
its does there are three possible
results of these tests your instance is
passing status checks your instance of
sealing instant status checks or your
instances feeling system status checks
the main point of auto recovery is to
perform a simple automated action on
your behalf so the instance can restore
its main function this happens when your
instance feels one of the mentioned
checks in other words if Clyde works
discovers your instance is having some
issues it can either reboot the instance
or recover the instance based on the
selection you made during initial
configuration of course there are other
considerations and some prerequisites
that should be checked for this I would
encourage you to take a look at our
documentation I'm going to show you how
to configure the auto recovery action
let's get started after you have signed
in to the AWS management console you
will need to go to services and ec2 once
you are in the ec2 management console
please go to instances you will nice
select the instance that you wish to
perform this action on then go to
actions guide which monitoring add or
edit alarms this is where we want to
create alarm in create alarm you can
quickly define a notification for
example you can send an email to me
whenever the alarm is triggered so I
will create topic
now the most important part select take
action and choose the option that should
be triggered on your behalf
recover action related only to field
system status checks the action stops
and starts your instance on new hardware
please keep in mind that the public IP
address of your instance will change and
data on the instance door volumes will
be removed stop to stop the instance
terminate to terminate the instance
reboot just to reboot the instance the
action configured here will be executed
by the IAM user account that configured
the alarm for this example I will choose
to recover the instance after our action
is configured we need to setup
constraints for it for example we want
our instance to recover
whenever status check field continuously
for at least two 5-minute periods what
does this mean if our instance fields
continuously for five minutes it will be
stopped and started by cloud watch now I
will choose to create an alarm and we
are done with the alarm if you
configured a notification you should
receive a confirmation email please
remember to activate it also make sure
that the user that configured the alarm
has iam permission to stop and start the
instance once again I would like to
encourage you to take a look at the
documentation for more details thanks
for watching and happy cloud computing
from all of us here at AWS