Link to home
Start Free TrialLog in
Avatar of sai vikas
sai vikas

asked on

AWS CLOUDWATCH

Hi,

I have written a script in bash to create a volume from a snapshot and attach to an instance.  So Can I setup Cloudwatch monitoring that would trigger this script if the EBS volume is lost.
Avatar of Phil Phillips
Phil Phillips
Flag of United States of America image

Unfortunately, CloudWatch itself has nothing built in for EBS volume health.

An alternative solution would be to write something that periodically checks the API (using describe-volume-status), and trigger your script based off of that.

Another solution: If you are using an elastic load balancer, you can make the volume health part of the health check.  If it fails, mark the instance as failed and use autoscaling rules to bring in a new one.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.