Question

Difficulty: MediumDeployment Strategies

A developer is using AWS CodeDeploy to perform an in-place deployment of a new application revision to an Amazon EC2 Auto Scaling group that currently contains 66 running instances. The deployment must satisfy the following constraints:

* A minimum of 33 instances must remain healthy and serve traffic at all times during the deployment process.
* The deployment must complete as quickly as possible while adhering to the healthy host constraint.

Which two CodeDeploy configurations can the developer use to meet these requirements?

  1. The default deployment configuration CodeDeployDefault.HalfAtATimeAnswer
  2. A custom deployment configuration with the minimumHealthyHosts parameter set to a type of FLEET_PERCENT and a value of 5050Answer
  3. C
    The default deployment configuration CodeDeployDefault.OneAtATime
  4. D
    The default deployment configuration CodeDeployDefault.AllAtOnce
  5. E
    A custom deployment configuration with the minimumHealthyHosts parameter set to a type of HOST_COUNT and a value of 5050

Answer

The developer can use the default deployment configuration CodeDeployDefault.HalfAtATime or a custom deployment configuration with the minimumHealthyHosts parameter set to a type of FLEET_PERCENT and a value of 5050.
The correct options are the default configuration that updates half of the instances at a time, and a custom configuration specifying a minimum of 50%50\% fleet health. For a fleet of 66 instances, keeping a minimum of 33 healthy instances requires maintaining at least 50%50\% health. The default configuration that accomplishes this in the fewest steps is the one that updates half the fleet at a time, completing in two batches. Alternatively, a custom configuration using a fleet percentage of 5050 achieves the exact same balance of speed and availability.

Step-by-Step Solution

1
Determine the minimum healthy host percentage and count required.
The target is 33 healthy instances out of 66, which represents exactly 50%50\% of the fleet.
This establishes the boundary conditions for the deployment configurations.
2
Evaluate the default configuration options against speed and capacity constraints.
CodeDeployDefault.HalfAtATime meets the requirement by updating 33 instances at a time (22 steps total). CodeDeployDefault.OneAtATime is too slow (66 steps), and CodeDeployDefault.AllAtOnce violates the healthy instances constraint.
To select the correct predefined deployment configuration.
3
Evaluate custom configuration parameters to match the target threshold.
A custom configuration with minimumHealthyHosts of type FLEET_PERCENT set to 5050 will correctly keep 33 instances healthy. Using HOST_COUNT with a value of 5050 expects 5050 physical hosts, which exceeds the fleet size.
To identify the correct custom deployment configuration settings.

Key Concept

AWS CodeDeploy deployment configurations allow developers to specify the number or percentage of instances that must remain healthy during an in-place deployment to balance availability and speed.
Rate this question