Soru

Zorluk: ZorAWS Elastic Beanstalk

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.)

  1. A shell script inside the `.platform/hooks/predeploy/` directory to run the custom script.Cevap
  2. A configuration file ending in `.config` inside the `.ebextensions/` directory containing a `services` block to enable and start the system daemon.Cevap
  3. C
    A shell script inside the `.ebextensions/hooks/` directory to run the custom script.
  4. D
    An `appspec.yml` file at the root of the source bundle containing the script path under the `ApplicationStart` hook.
  5. E
    A 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

1
Determine the directory structure required for custom hook scripts on Amazon Linux 2023 platforms.
Identify that platform hooks must reside in `.platform/hooks/` and that the `predeploy` phase runs after extraction but before the app goes live.
Elastic Beanstalk AL2023 platforms look for hooks in `.platform/hooks/` rather than `.ebextensions/`.
2
Determine how to manage system-level configuration such as starting daemons or services on boot.
Identify that the `.ebextensions/` directory contains `.config` files, which support a `services` section to configure system daemon startup.
The `.ebextensions/` files are processed during deployment to declare system configuration resources.

Anahtar Kavram

AWS Elastic Beanstalk configuration files and platform hooks directory layout
Tahmini Süre:2m 0s
Bu soruyu puanla