I'm about to start using AWS for the first time. From what I understood, when you terminate an instance or start a new one, all the data is lost. For user data I understand you are supposed to use cloud storage such as S3. That's ok.
Now what about all the configurations? Say I spend 2 hours setting up all the apache and PHP configuration or whatnot. How do I make sure it's still there when I terminate an instance, or start a new one?
Secondly, what about my actual app, the PHP code in my case, as well as the file permissions needed to run it? What happens when I terminate the instance? What if I have 3 instances and make changes to my code?
Sorry very new to this whole concept.
Thanks