Advanced Environment Customization with Configuration Files
You can add AWS Elastic Beanstalk configuration files (
.ebextensions) to your web
application's source code to configure your environment and customize the AWS resources that it
contains. Configuration files are YAML formatted documents with a
file extension that you place in a folder named
.ebextensions and deploy in
your application source bundle.
option_settings section of a configuration file defines values for configuration options. Configuration options let you
configure your Elastic Beanstalk environment, the AWS resources in it, and the software that runs your
application. Configuration files are only one of several ways to set configuration
resources section lets you further customize the resources in your
application's environment, and define additional AWS resources beyond the functionality provided
by configuration options. You can use
resources to add and configure any resources
supported by AWS CloudFormation, which Elastic Beanstalk uses to create environments.
The other sections of a configuration file (
services) let you configure the EC2
instances that are launched in your environment. Whenever a server is launched in your
environment, Elastic Beanstalk runs the operations defined in these sections to prepare the operating system
and storage system for your application.
One configuration file can contain multiple sections, or you can split your configuration into multiple files. Configuration files are processed in alphabetical order, so you can split your configuration activities into multiple stages.
Add configuration files to your source code in a folder named
.ebextensions and deploy it in your application source bundle.
healthcheckurl.config|-- .elasticbeanstalk | `-- config.yml |-- index.php `-- styles.css
The process varies slightly depending on the client that you use to manage your environments. See the following sections for details: