A developer is customizing an Elastic Beanstalk environment to install a third-party RPM package and create a configuration file during environment provisioning. The application source bundle is a standard ZIP file. Which mechanism should the developer use to add these customizations without modifying the platform itself?
- A. Create YAML or JSON configuration files inside a .ebextensions directory in the application source bundle✓ Correct
- B. Add the customizations to the Procfile in the application root
- C. Define the package and file resource in a separate AWS CloudFormation stack and reference it from the Elastic Beanstalk environment
- D. Upload a shell script named configure.sh to the Elastic Beanstalk S3 bucket before deploying
Explanation
The .ebextensions directory allows developers to include configuration files (with a .config extension, in YAML or JSON) inside the application source bundle. These files can install packages (using the packages key), create files (using the files key), run commands, and modify the environment without building a custom platform. — The Procfile is used to specify how to start application processes (similar to a web server command); it is not used for system-level package installation or file creation. — Uploading a shell script directly to S3 is not a recognized Elastic Beanstalk customization mechanism; Elastic Beanstalk would not automatically execute it. — Using a separate CloudFormation stack for OS-level configuration adds unnecessary complexity and tight coupling; .ebextensions handles this natively within the deployment bundle.