Question

Difficulty: MediumDeployment Strategies and Execution

A company hosts a web application on a fleet of Amazon EC2 instances managed by an Auto Scaling group. A SysOps Administrator is configuring AWS CodeDeploy to perform in-place deployments of application updates. The deployment must maintain at least 75% of the total instance capacity to ensure performance is not degraded. Since the Auto Scaling group dynamically scales based on CPU utilization, the configuration must adapt to varying instance counts. Which configuration for the minimum healthy hosts parameter in CodeDeploy will meet these requirements?

  1. A
    A custom deployment configuration with the type set to FLEET_PERCENT and the value set to 25
  2. B
    A custom deployment configuration with the type set to HOST_COUNT and the value set to 3
  3. A custom deployment configuration with the type set to FLEET_PERCENT and the value set to 75Answer
  4. D
    The predefined CodeDeployDefault.HalfAtOnce deployment configuration

Answer

A custom deployment configuration with the type set to FLEET_PERCENT and the value set to 75.
The custom deployment configuration using FLEET_PERCENT set to 75 ensures that CodeDeploy keeps at least 75% of the instances in the deployment group healthy at any given time during the deployment. Because the Auto Scaling group dynamically scales, using a percentage (FLEET_PERCENT) rather than a static count (HOST_COUNT) ensures that the 75% capacity threshold is dynamically calculated and maintained regardless of the fleet size.

Step-by-Step Solution

1
Analyze the capacity requirement and environment characteristics.
Identify that the application must maintain at least 75% capacity and that the Auto Scaling group scales dynamically, which means the instance count varies.
This rules out any static host count configurations, as they cannot scale proportionally with the Auto Scaling group.
2
Determine the parameter mapping for minimum healthy hosts in CodeDeploy.
Identify that CodeDeploy uses the minimum healthy hosts parameter to specify the minimum capacity that must remain online, rather than the capacity that can be taken offline.
This ensures the percentage is configured as 75 (minimum healthy) instead of 25 (maximum offline).
3
Evaluate standard versus custom deployment configurations.
Determine that predefined configurations (like HalfAtOnce or OneAtTime) do not guarantee 75% healthy capacity for dynamically scaling fleets, requiring a custom deployment configuration.
A custom deployment configuration with FLEET_PERCENT set to 75 dynamically calculates and maintains the correct threshold as the fleet size changes.

Key Concept

AWS CodeDeploy Custom Deployment Configurations and Capacity Management
Rate this question