Soru

Zorluk: ZorAWS Elastic Beanstalk

A developer needs to deploy a new version of a high-traffic web application to an AWS Elastic Beanstalk environment. The deployment must satisfy the following requirements:
- The environment must maintain 100%100\% of its current instance capacity during the deployment to prevent performance degradation.
- In the event of a deployment failure, the rollback process must be quick and have zero impact on the active, healthy instances currently serving production traffic.
- Custom environment properties and configuration files must be applied automatically as part of the application source bundle.

Which deployment strategy and configuration approach should the developer use?

  1. A
    Use the Rolling deployment policy, and place the configuration files in a .ebextensions folder at the root of the source bundle.
  2. B
    Use the Rolling with additional batch deployment policy, and place the configuration files in an ebextensions folder at the root of the source bundle.
  3. Use the Immutable deployment policy, and place the configuration files in a .ebextensions folder at the root of the source bundle.Cevap
  4. D
    Use the All at once deployment policy, and place the configuration files in a .ebextensions folder at the root of the source bundle.

Cevap

Use the Immutable deployment policy, and place the configuration files in a .ebextensions folder at the root of the source bundle.
The Immutable deployment policy ensures that a completely new set of instances (in a temporary Auto Scaling group) is created to deploy the new version alongside the existing instances. This maintains 100%100\% capacity of the original environment during the deployment. If the deployment fails, Elastic Beanstalk terminates the new Auto Scaling group, causing zero impact to the original, running instances and allowing an instant rollback. Custom configuration files must be located in a folder named .ebextensions (with a leading dot) at the root of the application source bundle to be processed by Elastic Beanstalk.

Adım Adım Çözüm

1
Analyze the capacity requirement during deployment
The requirement specifies that the application must maintain 100%100\% capacity during deployment. This rules out the Rolling policy, which reduces instance capacity as it updates batches.
To maintain 100%100\% capacity, the deployment policy must provision additional instances before taking existing ones out of service or updating them.
2
Analyze the rollback and failure recovery requirement
The rollback must be instant and have zero impact on the existing running instances. Rolling with additional batch requires a rolling rollback to redeploy the previous version, whereas Immutable creates a parallel Auto Scaling group that can be instantly terminated upon failure without touching the original instances.
Immutable deployment offers the cleanest and fastest rollback mechanism because the original production environment remains untouched until the new version passes health checks.
3
Verify the configuration file directory naming convention
Elastic Beanstalk requires configuration files to be placed in a folder named .ebextensions (with a leading dot) at the root of the source bundle. Misnaming it as ebextensions causes the configuration to be ignored.
Elastic Beanstalk specifically scans for the .ebextensions directory at the root level of the application zip archive during provisioning.

Anahtar Kavram

AWS Elastic Beanstalk Deployment Policies and Configuration Files
Bu soruyu puanla