Menu
AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)

Configuration Options

This section lists the namespaces, options and values that can be specified in configuration files (.ebextensions), saved configurations, and option settings applied directly to an environment when it is created or updated using the Elastic Beanstalk console, the EB CLI, the AWS CLI, or an SDK.

Configuration option settings can be composed in text format and saved prior to environment creation, applied during environment creation using any supported client, and added, modified or removed after environment creation. For a detailed breakdown of all of the available methods for working with configuration options at each of these three stages, read the following topics:

For a complete list of namespaces and options, including default and supported values for each, see General Options for All Environments and Platform Specific Options.

Precedence

During environment creation, configuration options are applied from multiple sources with the following precedence, from highest to lowest:

  • Settings applied directly to the environment – Settings specified during a create environment or update environment operation on the Elastic Beanstalk API by any client, including the AWS Management Console, EB CLI, AWS CLI, and SDKs. The AWS Management Console and EB CLI also apply recommended values for some options that apply at this level unless overridden.

  • Saved Configurations – Settings for any options that are not applied directly to the environment are loaded from a saved configuration, if specified.

  • Configuration Files (.ebextensions) – Settings for any options that are not applied directly to the environment, and also not specified in a saved configuration, are loaded from configuration files in the .ebextensions folder at the root of the application source bundle.

    Configuration files are executed in alphabetical order. For example, .ebextensions/01run.config is executed before .ebextensions/02do.config.

  • Default Values – If a configuration option has a default value, it only applies when the option is not set at any of the above levels.

If the same configuration option is defined in more than one location, the setting with the highest precedence is applied. When a setting is applied from a saved configuration or settings applied directly to the environment, the setting is stored as part of the environment's configuration. These settings can be removed with the AWS CLI or with the EB CLI.

Settings in configuration files are not applied directly to the environment and cannot be removed without modifying the configuration files and deploying a new application version. If a setting applied with one of the other methods is removed, the same setting will be loaded from configuration files in the source bundle.

For example, say you set the minimum number of instances in your environment to 5 during environment creation, using either the AWS Management Console, a command line option, or a saved configuration. The source bundle for your application also includes a configuration file that sets the minimum number of instances to 2.

When you create the environment, Elastic Beanstalk sets the MinSize option in the aws:autoscaling:asg namespace to 5. If you then remove the option from the environment configuration, the value in the configuration file is loaded, and the minimum number of instances is set to 2. If you then remove the configuration file from the source bundle and redeploy, Elastic Beanstalk uses the default setting of 1.

Recommended Values

The Elastic Beanstalk Command Line Interface (EB CLI) and Elastic Beanstalk console provide recommended values for some configuration options. These values can be different from the default values and are set at the API level when your environment is created. Recommended values allow Elastic Beanstalk to improve the default environment configuration without making backwards incompatible changes to the API.

For example, both the EB CLI and Elastic Beanstalk console set the configuration option for EC2 instance type (InstanceType in the aws:autoscaling:launchconfiguration namespace). Each client provides a different way of overriding the default setting. In the console you can choose a different instance type from a drop down menu on the Configuration Details page of the Create New Environment wizard. With the EB CLI, you can use the --instance_type parameter for eb create.

Because the recommended values are set at the API level, they will override values for the same options that you set in configuration files or saved configurations. The following options are set:

Elastic Beanstalk console

  • Namespace: aws:elb:loadbalancer

    Option Name: CrossZone

  • Namespace: aws:elasticbeanstalk:command

    Option Name: DeploymentPolicy, BatchSize and BatchSizeType

  • Namespace: aws:autoscaling:launchconfiguration

    Option Names: IamInstanceProfile, EC2KeyName, InstanceType

  • Namespace: aws:elasticbeanstalk:healthreporting:system

    Option Name: SystemType and HealthCheckSuccessThreshold

  • Namespace: aws:elasticbeanstalk:environment

    Option Name: ServiceRole

  • Namespace: aws:elasticbeanstalk:application

    Option Name: Application Healthcheck URL

  • Namespace: aws:elb:policies

    Option Names: ConnectionDrainingTimeout and ConnectionDrainingEnabled

  • Namespace: aws:autoscaling:updatepolicy:rollingupdate

    Option Names: RollingUpdateType and RollingUpdateEnabled

  • Namespace: aws:elasticbeanstalk:sns:topics

    Option Name: Notification Endpoint

EB CLI

  • Namespace: aws:elb:loadbalancer

    Option Name: CrossZone

  • Namespace: aws:elasticbeanstalk:command

    Option Name: BatchSize and BatchSizeType

  • Namespace: aws:autoscaling:launchconfiguration

    Option Names: IamInstanceProfile, InstanceType

  • Namespace: aws:elasticbeanstalk:healthreporting:system

    Option Name: SystemType

  • Namespace: aws:elasticbeanstalk:environment

    Option Name: ServiceRole

  • Namespace: aws:elb:policies

    Option Names: ConnectionDrainingEnabled

  • Namespace: aws:autoscaling:updatepolicy:rollingupdate

    Option Names: RollingUpdateType and RollingUpdateEnabled

If you use the Elastic Beanstalk console or EB CLI to create environments, and you want to set these options using configuration files or saved configurations, you can remove the options settings with the AWS CLI or EB CLI after the environment is created.