I have deployed my application onto AWS EC2 and I want to implement automation where if I restart my instance or when the Nginx web server is down, it will restart by itself. I do not really know where to start with this.
I heard I can use crontab to schedule automatic monitoring and if it is down, it can send email alerts and restart the webserver.