A developer is packaging a Python application for deployment to AWS Elastic Beanstalk. The application requires a custom Unix user to be created on the host Amazon EC2 instances during environment provisioning. To automate this, the developer creates a configuration file named `01_user.config` containing the user definition. However, after deploying the application source bundle to the Elastic Beanstalk environment, the user is not created and the configuration is ignored.
The layout of the deployed application zip file is as follows:
/
├── application.py
├── requirements.txt
└── config/
└── .ebextensions/
└── 01_user.config
Which action must the developer take to ensure Elastic Beanstalk applies the configuration?
- ARename the `.ebextensions` directory to `ebextensions` and keep it inside the `config` directory.
- BAdd a `Transform: AWS::Serverless-2016-10-31` declaration to the top of the `01_user.config` file.
- Move the `.ebextensions` directory to the root of the application source bundle.Answer
- DDeploy the configuration changes using an AppSpec file placed at the root of the application source bundle.
Answer
Move the `.ebextensions` directory to the root of the application source bundle.
For AWS Elastic Beanstalk to apply customization settings defined in `.config` files, the `.ebextensions` directory must be at the root of the application source bundle. Placing it inside a folder such as `config/` will cause Elastic Beanstalk to ignore the configurations.
Step-by-Step Solution
Key Concept
AWS Elastic Beanstalk requires configuration files to be placed in a directory named `.ebextensions` at the root of the application source bundle.
Estimated Time:1m 30s