Elastic Beanstalk
Developer Guide (API Version 2010-12-01)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.

Elastic Beanstalk Environment Configuration

When deploying your applications, you may want to customize and configure the software that your application depends on. These files could be either dependencies required by the application—for example, additional packages from the yum repository—or they could be configuration files such as a replacement for httpd.conf to override specific settings that are defaulted by AWS Elastic Beanstalk. You may also want to customize your environment resources that are part of your AWS Elastic Beanstalk environment (e.g., SQS queues, ElastiCache clusters). For example, you may want to add an Amazon SQS queue and an alarm on queue depth, or you might want to add an Amazon ElastiCache cluster.

You can easily customize your environment at the same time that you deploy your application version by including a configuration file with your source bundle. When customizing the software on your instance, it is more advantageous to use a configuration file than to create a custom AMI because you do not need to maintain a set of AMIs.

Using Configuration Files

You can include one or more configuration files with your source bundle. Configuration files must be named with the extension .config (for example, myapp.config) and placed in an .ebextensions top-level directory in your source bundle. Configuration files are executed in alphabetical order. For example, .ebextensions/01run.config is executed before .ebextensions/02do.config.

Configuration files should conform to YAML or JSON formatting standards. For example, indentation is critical to the proper interpretation of YAML. For more information, go to http://www.yaml.org/start.html or http://www.json.org, respectively.

For Visual Studio, .ebextensions needs to be part of the project to be included in the archive. Alternatively, instead of including the configuration files in the project, you can use Visual Studio to deploy all files in the project folder.

To deploy all files in the project folder using Visual Studio

  1. In Visual Studio, in Solution Explorer, right-click the project name, and then click Properties.

  2. Click the Package/Publish Web tab.

  3. In the Items to deploy section, select All Files in the Project Folder in the drop-down list.

When you are ready, deploy your application version. For more information, see Create an Application Version.


You can view the output of the steps executed during deployment by reviewing logs. For instructions on how to view logs, see Instance Logs. If any error occurs during the deployment process, Elastic Beanstalk does not deploy the new application version. Elastic Beanstalk will continue to run the last application version that you successfully deployed.

When customizing your Elastic Beanstalk environment, you can configure the software on your Amazon EC2 instances as well as the AWS resources in your environment. This section is split into the following parts:

Each section describes the supported configuration settings and their syntax, as well as provides examples. For a full list of available options, namespaces, and supported values, see Configuration Options.

This feature is not supported by legacy containers. See To check if you are using a legacy container type if you are unsure if you are on a legacy configuration or not.