I am in the process of deploying a production environment for a website,

It runs on AWS. This includes a private VPC with a load balancer and a single EC2 instance running Debian 8.1

However, in the future there will be more EC2 instances as traffic becomes heavier and the load balancer actually needs to work.

Therefore I am currently looking into options to deploy multiple EC2 instances with the same codebase and configuration. It comes down to storage, but I don't think that it is possible to reliably deploy S3 as a home directory for our website.

The current EC2 instance also makes use of Syslog and many other security features such as tripwire. The main website runs as a wsgi app under apache and is Python (Django) based.

Unfortunately, we will also need to push files that can be downloaded by the users. Is unison a solution or what would be used ?

ElasticBeanstalk is not an option. The website itself is deployed using git.

1 Answer 1


You can simply bake an AMI with the current version of your code and configs and then create as many EC2 machines as you'd like.

Check out Packer and AWS auto scaling groups.

  • Good answer, except that I would prefer not to bake in the source code into the AMI. Instead, I would download the source code when the machine is created and initialised. Doing it this way, you wouldn't need to rebuild the AMI every time you want to release an update to your application. If you for example do continuous deployment, rebuilding the AMI every release will not be a viable option.
    – Bazze
    Jun 18, 2015 at 5:01
  • Many people do CI/CD with baked AMIs. One advantage, for example, is faster time to spin up new instances behind an ELB. It definitely depends on your environment.
    – dmourati
    Jun 18, 2015 at 5:48
  • It does give you faster booting time, but downloading a tar ball of 20mb (or even 200mb) from S3 and unpacking it doesn't really add that much more time. From my experience, those extra few seconds is worth it to reduce some time (often 5-15 minutes) in the build & packaging step. But I agree with you, it definitely depends on your environment.
    – Bazze
    Jun 18, 2015 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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