Soru

Zorluk: Çok zorAWS Elastic Beanstalk

A company runs a high-traffic web application on AWS Elastic Beanstalk. The development team has created a new version of the application that requires custom environment properties and packages a shell script that must run on the underlying EC2 instances during deployment. The deployment must satisfy the following requirements:
- The application must maintain 100% of its serving capacity during the deployment to prevent latency spikes.
- In the event of a deployment failure (such as a health check timeout on the new version), the environment must automatically revert to the previous version with zero downtime and no manual intervention.
- The custom shell script must execute successfully during the deployment before the new version starts receiving production traffic.

Which deployment strategy and configuration action should the developer use to meet these requirements?

  1. Configure the deployment policy to Immutable. Place the configuration file for the shell script inside a directory named .ebextensions at the root of the application source bundle.Cevap
  2. B
    Configure the deployment policy to Rolling with additional batch. Place the configuration file for the shell script inside a directory named .ebextensions at the root of the application source bundle.
  3. C
    Configure the deployment policy to Immutable. Place the configuration file for the shell script inside a directory named ebextensions at the root of the application source bundle.
  4. D
    Configure the deployment policy to All at once. Place the configuration file for the shell script inside a directory named .ebextensions at the root of the application source bundle.

Cevap

Configure the deployment policy to Immutable and place the configuration file inside a directory named .ebextensions at the root of the application source bundle.
The Immutable deployment policy fulfills the requirement of maintaining 100% capacity by launching a temporary Auto Scaling group alongside the original one. It also satisfies the automatic rollback requirement because if the health checks fail on the new instances, Elastic Beanstalk automatically deletes the temporary Auto Scaling group, leaving the original instances untouched. Additionally, placing the configuration files in a directory named exactly .ebextensions at the root of the application source bundle ensures that Elastic Beanstalk parses and executes the custom scripts.

Adım Adım Çözüm

1
Analyze the capacity requirement during deployment.
The requirement is to maintain 100% serving capacity. This rules out 'All at once' and standard 'Rolling' policies (which take instances out of service), leaving 'Rolling with additional batch' and 'Immutable' as candidates.
Maintaining capacity avoids performance degradation during updates.
2
Analyze the rollback requirement.
The environment must automatically and immediately revert on failure with no manual intervention. 'Rolling with additional batch' does not support automated rollback (it halts and requires a manual rollback deployment). Only 'Immutable' automatically terminates the new temporary Auto Scaling group on failure, achieving instant rollback with zero impact on the active group.
An Immutable deployment isolates the new version in a separate Auto Scaling group during validation, allowing safe and automatic cleanup if it fails.
3
Determine the correct folder path for Elastic Beanstalk configuration files.
Elastic Beanstalk configuration files must reside in the .ebextensions/ folder at the root of the application source bundle. A directory named ebextensions (without the leading dot) will be ignored by Elastic Beanstalk.
Elastic Beanstalk's platform agent specifically looks for the hidden .ebextensions directory to execute configuration scripts.

Anahtar Kavram

AWS Elastic Beanstalk deployment policies and .ebextensions configuration
Bu soruyu puanla