Elastic Beanstalk deployment strategies

Bogdan Samoletskyi
3 min readJul 6, 2020

Key differences between them.

Photo by Ryan Quintal on Unsplash

Disclaimer:

This is the tenth article from series about Amazon Web Services (AWS) which I will write as a preparation to the Certified developer exam associate.

What is the deployment strategy?

Elastic Beanstalk is a powerful deployment tool, using for application deployment in AWS. In simplest scenario you have only one deployment and will just redeploy a new version of your application over the old. But what if you have more that one instances, using with ELB? What of you need to have zero downtime on your production application? For such demands Elastic beanstalk has a few strategies.

Deployment strategies overview.

Documentation

Amazon has a really good documentation about different deployment strategies. Let’s go one-by-one.

All at once — easiest strategy — just update your application on all instances simultaneously. Pros: Quickest deployment. Cons: service unavailable during the deployment.

Rolling — if you have more than one instance, you can update instances one by one, or by dividing them in groups. Let’s say you have 2 instances, instance 1 going to update, but instance 2 continue working with old version and serving it’s duties. After application updated on 1st instance and prove it works, instance 2 start to be updating. Pros: no additional instances required, zero downtime. Cons: It will take longer time to deploy, service capacity can suffer (so service quality too).

Rolling with additional batch — what if you don’t want to decrease your application capacity? In this case you can replicate part of your instances to maintain the same capacity. In the previous example just replicate 1 instance (it will be 3 overall), update one instance (during the update it will be still 2 working instances), get it back to work and take the second one. By rotating the instances application capacity will be the same all the time. After the deployment just remove additional instances. Pros: application runs with full capacity, small additional cost. Cons: Additional cost for new instances, longer deployment.

--

--