I have an EC2 instance with a web server installed, where several dynamic websites with databases are hosted. I set up an auto-scaling group that launches new instances on high CPU load.
My confusion is that when a new instance is launched by auto scaling, it is completely empty, it does not have a web server installed and has no data from my sites. So when a user is routed to this new instance, he will not be able to see my sites. I thought it should clone the filesystem for new instances to have the same data accessible from all instances launched by an auto scaling group.
So I presume I am supposed to clone my instance somehow to use it for auto scaling and load balancing. So how do I do that? Should I create an AMI from my running instance and use it for my launch configuration and will it contain my websites data? Or should I use something like CodeDeployment and will it be possible to deploy multiple applications (all my websites) and how will this affect instance launch time?