A developer needs to deploy a new version of a Java application to an AWS Elastic Beanstalk environment. The deployment must install a security patch on the host operating system using an environment configuration file named `security.config`. The application requires zero downtime during deployment, and the developer must ensure that if the deployment fails, the running production instances remain completely unaffected and do not require a manual recovery process. Which configuration and deployment setup meets these requirements?
- AUse the Rolling deployment policy, and place `security.config` in the `.ebextensions/` directory at the root of the application source bundle.
- Use the Immutable deployment policy, and place `security.config` in the `.ebextensions/` directory at the root of the application source bundle.Cevap
- CUse the Immutable deployment policy, and place `security.config` in the `ebextensions/` directory at the root of the application source bundle.
- DUse the All at once deployment policy, and place `security.config` in the `.ebextensions/` directory at the root of the application source bundle.
Cevap
Use the Immutable deployment policy, and place the configuration file in the `.ebextensions/` directory at the root of the application source bundle.
The correct answer proposes using the Immutable deployment policy and placing the configuration file in the `.ebextensions/` directory. The Immutable deployment policy performs an update by launching a second Auto Scaling group with instances running the new version. If these new instances fail health checks, Elastic Beanstalk terminates them, leaving the original environment and instances completely untouched. This satisfies the requirement that production instances remain unaffected in case of failure. Placing the configuration file in the `.ebextensions/` directory at the root of the source bundle ensures that Elastic Beanstalk successfully parses and applies the custom configuration.
Adım Adım Çözüm
Anahtar Kavram
AWS Elastic Beanstalk Immutable deployments and `.ebextensions` configuration directory naming.