A development team is deploying a web application to an AWS Elastic Beanstalk environment running on an Amazon Linux 2023 platform. The application requires two configuration changes: First, a custom shell script must execute after the application source code has been extracted to the staging directory but before it is moved to the final path. Second, a custom system daemon (systemd service) must be configured to start automatically when each EC2 instance boots. Which combination of files and directory structures must the developer include in the application source bundle to satisfy these requirements? (Select TWO.)
- A shell script inside the `.platform/hooks/predeploy/` directory to run the custom script.Cevap
- A configuration file ending in `.config` inside the `.ebextensions/` directory containing a `services` block to enable and start the system daemon.Cevap
- CA shell script inside the `.ebextensions/hooks/` directory to run the custom script.
- DAn `appspec.yml` file at the root of the source bundle containing the script path under the `ApplicationStart` hook.
- EA shell script inside the `.ebextensions/predeploy/` directory to execute during the predeploy stage.
Cevap
The correct options are placing the custom shell script under the `.platform/hooks/predeploy/` directory and placing a `.config` configuration file under the `.ebextensions/` directory containing a `services` block.
To execute custom scripts during specific deployment phases on Amazon Linux 2023, scripts must be placed in `.platform/hooks/predeploy/`. To manage system services, a `.config` file within the `.ebextensions/` folder containing a `services` section must be used.
Adım Adım Çözüm
Anahtar Kavram
AWS Elastic Beanstalk configuration files and platform hooks directory layout
Tahmini Süre:2m 0s