A developer is deploying a Go application to AWS Elastic Beanstalk running on Amazon Linux 2023. The deployment must satisfy two requirements: set custom environment properties that the application reads at runtime, and run a bash script to install a monitoring agent after the application files are extracted but before the application process is started. Which two steps should the developer take to configure the application source bundle? (Select TWO.)
- Create a configuration file with a .config extension inside a directory named .ebextensions at the root of the source bundle, defining the properties under the aws:elasticbeanstalk:application:environment namespace.Cevap
- Place the bash script in the .platform/hooks/predeploy directory at the root of the source bundle and ensure the script has execute permissions.Cevap
- CPlace the bash script in the .platform/predeploy directory at the root of the source bundle.
- DCreate a configuration file with a .config extension inside a directory named ebextensions (without a leading dot) at the root of the source bundle.
- EDefine the environment properties in a file named options.txt inside a directory named .platform at the root of the source bundle.
Cevap
To deploy the Go application with the given requirements, the developer must create a configuration file inside the .ebextensions directory at the root of the application source bundle to set the environment properties under the application environment namespace, and place the startup script inside the .platform/hooks/predeploy directory at the root of the source bundle.
To configure environment properties via configuration files, the properties must be defined in a .config file inside the .ebextensions directory at the root of the source bundle under the aws:elasticbeanstalk:application:environment namespace. To run scripts during deployment on Amazon Linux 2023, you must use platform hooks placed in the .platform/hooks/predeploy directory to execute after staging but before the application starts.
Adım Adım Çözüm
Anahtar Kavram
Elastic Beanstalk environment configuration via .ebextensions and custom scripts using .platform hooks
Tahmini Süre:2m 0s