A developer is planning to deploy a new version of an application on AWS Elastic Beanstalk. The application is currently running in a single production environment containing Amazon EC2 instances behind an Application Load Balancer. The deployment must meet the following constraints:
- The environment must maintain of its processing capacity ( active instances) during the deployment process.
- To control cost, the developer must not create a separate, duplicate Elastic Beanstalk environment or perform a DNS swap.
- The rollback process must be fully automated in the event that the new version fails application health checks.
Which Elastic Beanstalk deployment policy should the developer select?
- ARolling with additional batch
- ImmutableAnswer
- CRolling
- DBlue/Green environment swap
Answer
The Immutable deployment policy should be selected because it maintains capacity by deploying the new version to a temporary Auto Scaling group, automatically rolls back if health checks fail, and operates within a single Elastic Beanstalk environment.
The Immutable deployment policy satisfies all constraints. It maintains capacity by launching a temporary Auto Scaling group with the new version alongside the original instances. If the new version fails health checks, Elastic Beanstalk automatically deletes the temporary Auto Scaling group, rolling back the deployment. Additionally, it avoids the overhead of managing a separate Elastic Beanstalk environment.
Step-by-Step Solution
Key Concept
AWS Elastic Beanstalk deployment policies and their trade-offs regarding capacity, rollback behavior, and environment overhead.