Advertisement
Intermediate AWS, AWS Elastic Beanstalk

How does Elastic Beanstalk handle application updates and deployment policies such as rolling and immutable deployments?

Short answer

Elastic Beanstalk supports several deployment policies including all at once, which updates every instance simultaneously with brief downtime, rolling, which updates instances in batches while keeping some capacity available, and immutable, which launches an entirely new set of…

Save AWS mock interview
Advertisement
AModel answer
Elastic Beanstalk supports several deployment policies including all at once, which updates every instance simultaneously with brief downtime, rolling, which updates instances in batches while keeping some capacity available, and immutable, which launches an entirely new set of instances with the updated version and only shifts traffic to them once they pass health checks, providing the safest rollback option since the original instances remain untouched until the new version is confirmed healthy.
Example

eb config --deployment-policy Immutable

Real-world example
A company deploying a critical update to its production environment chooses the immutable deployment policy, ensuring that if the new version fails its health checks, traffic never shifts away from the still healthy original instances, avoiding any customer facing downtime.
Likely follow-ups
  • What is the tradeoff between rolling and immutable deployments in terms of cost and speed?
  • How do you configure the batch size for a rolling deployment?
Related topics