title: How to prevent downtime during AWS Elastic Beanstalk deployment of a new version of the app?
body: <p>My understanding of <a href="http://aws.amazon.com/elasticbeanstalk/">Elastic Beanstalk</a> is that when you deploy a new version of your app, that it deploys it to the <a href="http://aws.amazon.com/ec2/">Amazon EC2</a> instances one at a time (if you have more than one).  However, even with a minimum of two instances, my application incurs a short amount of downtime when I upload a new <code>.war</code> when it is deploying it, as if it is updating them both simultaneously.  Is there a way I can ensure there is no downtime and that one instance is fully updated and accepting requests before the next starts:  Here is how the events look.  Note this is with zero load on the app, so it will only get worse with production traffic.</p>
  
  <pre><code>INFO
  Environment update completed successfully.
  
  INFO
  New application version was deployed to running EC2 instances.
  
  ERROR
  The application did not respond at the health check URL.
  
  INFO
  Waiting for 8 seconds while EC2 instances download the updated application version.
  
  INFO
  Deploying version SomethingMore to 2 instance(s).
  </code></pre>