I have an EC2 instance on AWS that is currently hosting a simple Webserver using nginx and python-flask. The OS on the instance is Ubuntu 16.04.
I am concerned about a potential server failure, so I want to set up AWS CloudWatch to automatically spin the server back up, should it fail.
What I'm trying to now understand is whether CloudWatch will restore the files on my server, so that the web-server will keep running smoothly (providing I specify a script to restart nginx and my flask app), or whether the new server will be a fresh Ubuntu instance, such that I need to supply a configuration file to pull all the files, install dependencies, launch nginx, etc.