DVA-C02 practice question 12 of 35

A company has a website that is developed in PHP and is launched using AWS Elastic Beanstalk. There is a new version of the website that needs to be deployed in the Elastic Beanstalk environment. The company cannot tolerate having the website offline if an update fails. Deployments must have minimal impact and rollback as soon as possible.

Full set: 598 questions

Domain Security

Answer options
A: All at once
B: Rolling
C: Snapshots
D: Immutable Correct answer
Correct Answer:
D. Immutable
Explanation

The immutable deployment policy is the most suitable option as it meets all the specified requirements. With an immutable update, AWS Elastic Beanstalk deploys the new application version to a completely new set of Amazon EC2 instances in a separate, temporary Auto Scaling group. Once the new instances pass health checks, they are moved to the production Auto Scaling group, and the old instances are terminated. If the deployment fails at any stage, the new instances are terminated, and the original instances continue to serve traffic without any interruption. This ensures zero downtime, minimal impact on users, and provides an immediate and safe rollback mechanism.

Why Incorrect

A. All at once: This policy takes all existing instances offline simultaneously to deploy the new version, causing downtime, which is explicitly forbidden by the requirements.
B. Rolling: This policy updates instances in batches, reducing the environment's capacity during the update. A failure can leave the environment in a mixed state, and rollback requires another rolling update.
C. Snapshots: Snapshots are a data backup mechanism for services like Amazon EBS or RDS and are not an application deployment policy within AWS Elastic Beanstalk.

References

1. AWS Elastic Beanstalk Developer Guide: Under the section "Deployment policies and settings

" the guide details the immutable update policy. It states

"Immutable updates perform an immutable deployment to update your environment... If the new instances don't pass health checks

or you choose to abort the update

Elastic Beanstalk terminates them

leaving the original instances untouched." This confirms its suitability for zero-downtime and fast rollback scenarios.

Source: AWS Elastic Beanstalk Developer Guide

"Deployment policies and settings

" section on "Immutable updates."

2. AWS Elastic Beanstalk Developer Guide: The same guide contrasts the "All at once" policy

explaining it deploys the new version to all instances simultaneously

making them "out of service for a short time while the deployment occurs

" which violates the no-downtime requirement.

Source: AWS Elastic Beanstalk Developer Guide

"Deployment policies and settings

" section on "All at once deployments."

3. AWS Elastic Beanstalk Developer Guide: The guide describes the "Rolling" policy

noting that "your environment's capacity is reduced by the number of instances in a batch during the deployment

" which contradicts the minimal impact requirement.

Source: AWS Elastic Beanstalk Developer Guide

"Deployment policies and settings

" section on "Rolling deployments."

Scroll to Top