Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am pretty new to AWS so please excuse my ignorance. We are wanting to have a setup whereby we have a SQL DB instance + web server instance. However we would like the Web server to sit behind an ELB thus allowing us to use Autoscaling. My question however is how to we replicate the web app across instances? Say for example we have two web servers running and we need to make a critical update to the web app, ultimately we would only want to upload to one instance and not both.

Is it even best practice to store your web app on the instance or are there better ways to store and share the app between instances?

share|improve this question

Check out Elastic Beanstalk. It makes everything for you. It is a rather new service from AWS.

Elastic Beanstalk automatically handles the deployment details of capacity provisioning, load balancing, auto-scaling, and application health monitoring.

It supports many of the common web development languages: PHP, .NET, Java, Python and Ruby. I'm not sure what is your preferred languages, but if it is one of the above, you will find it rather easy to deploy it from your IDE (Eclipse or Visual Studio).

You can still connect to your instances, even if your deployed them with Beanstalk.

The manual way to do it is simply to have your instance installed with your application, attached to EBS. The image of your application can then be launched again and again with more instances. You will have to make some changes to the configurations of the different instances, by using the USER_DATA fields of the instance (again, if it is too complex, look again at Beanstalk...).

A more automated way is to use CloudFormation, which is basically a script that describes your different servers. Using this script your can launch several instance very easily. You can launch them through the web console, or using the CLI tools. I recommend using the open sourced python library boto.

You can also consider using S3 to store and share your web files. You don't need to worry about replicating the files among the instances, and you can also serve them with CloudFront or other CDN services.

Another alternative is to use Route 53, which is the DNS service of AWS, but it has very nice features that allows routing your data to different web servers for A/B testing, or based on the latency of your servers (LBR).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.