Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated to release 2.13.1.

You can use the Elastic Beanstalk Environment task to create, update, rebuild, restart, swap or terminate an AWS Elastic Beanstalk environment (see Deploying to AWS Elastic Beanstalk for an overview of the Elastic Beanstalk component lifecycle and deployment workflow).

Image Removed

Configuration

Tip

To ease common scenarios, the Create action allows to Update [the] environment, if it already exists.

Tip
titleDocker Support

You can also deploy AWS Elastic Beanstalk applications from Docker containers - select an appropriate solution stack from Configuration Source as follows:

Info
titleDeployment Cycle

The required Version Label stems from an Application Version previously provisioned - assuming an Application already exists, the typical deployment cycle is as follows:

To configure an AWS Elastic Beanstalk Environment task:

  • Navigate to the Tasks configuration tab for the job (this will be the default job if creating a new plan).
  • Click the name of an existing AWS Elastic Beanstalk Environment task, or click Add Task and then AWS Elastic Beanstalk Environment to create a new task.
  • Complete the following settings:

    Common to all tasks
    Include Page_CommonTaskParametersTable_CommonTaskParametersTable

    Actions supported by this task:

     

    Create

     Update environment, if it already existsCheck to apply the Update action, if the environment already exists. Clear to trigger a build failure otherwise.
    • (info) In case of an Update action, only applicable fields are used, i.e. the following fields are ignored:
      • Environment Tier
      • CNAME Prefix
      • Configuration Source
      • Solution Stack
      • Tags
    Application Name

    Specify the name of the application that contains the version to be deployed

    Environment Name

    Specify an environment name.

    (warning) Must be unique within your account

    You can use the Elastic Beanstalk Environment task to create, update, rebuild, restart, swap or terminate an AWS Elastic Beanstalk environment (see Deploying to AWS Elastic Beanstalk for an overview of the Elastic Beanstalk component lifecycle and deployment workflow).

    Image Added

    Configuration

    Tip

    To ease common scenarios, the Create action allows to Update [the] environment, if it already exists.


    Tip
    titleDocker Support

    You can also deploy AWS Elastic Beanstalk applications from Docker containers - select an appropriate solution stack from Configuration Source as follows:


    Info
    titleDeployment Cycle

    The required Version Label stems from an Application Version previously provisioned - assuming an Application already exists, the typical deployment cycle is as follows:

    To configure an AWS Elastic Beanstalk Environment task:

    1. Navigate to the Tasks configuration tab for the job (this will be the default job if creating a new plan).
    2. Click the name of an existing AWS Elastic Beanstalk Environment task, or click Add Task and then AWS Elastic Beanstalk Environment to create a new task.
    3. Complete the following settings:

      1. Common to all tasks

        Include Page
        _CommonTaskParametersTable
        _CommonTaskParametersTable

      • Actions supported by this task:

         

        Create Environment

         
        Update environment, if it already existsCheck to apply the Update action, if the environment already exists. Clear to trigger a build failure otherwise.
        • (info) In case of an Update action, only applicable fields are used, i.e. the following fields are ignored:
          • Environment Tier
          • CNAME Prefix
          • Configuration Source
          • Solution Stack
          • Tags
        Application Name

        Specify the name of the application that contains the version to be deployed

        Environment Name

        Specify an environment name.

        • (warning) Must be unique within your account. If the name already exists, the task will fail.
        Environment Tier

        Select a Web Server or Worker environment tier.

        Version Label

        (Optional) Specify the label of the application version to deploy.

        • (warning) If not specified, AWS Elastic Beanstalk attempts to launch the sample application in the container. 
        CNAME Prefix

        (Optional) Specify the prefix for the CNAME that the environment should attempt to use.

        • (warning) Must be unique across all Elastic Beanstalk environments. If the name already exists, the task will fail.
      Environment Tier

      Select a Web Server or Worker environment tier.

      Version Label

      (Optional) Specify the label of the application version to deploy.

      • (warning) If not specified, AWS Elastic Beanstalk attempts to launch the sample application in the container. 
      CNAME Prefix

      (Optional) Specify the prefix for the CNAME that the environment should attempt to use.

      • (warning) Must be unique across all Elastic Beanstalk environments. If the name already exists, the task will fail.
      • (info) If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.
      Configuration SourceSelect a predefined solution stack or saved named template.
      •  (info) There might be more recent solution stacks available, see Supported Platforms – you can enter an updated version manually.
      Generated Variables Code Block
      languagetext
      linenumberstrue
      Creating common variables for 1 resources affected by task: ... custom.aws.elasticbeanstalk.environment.resources: e-nfmuvhyf3j Creating resource variables for environment 'TE-TAWS-IT220-EBE-24' with environmentId 'e-nfmuvhyf3j': ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.ApplicationName: TEA-TAWS-IT220-EBE-24 ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.CNAME: TAWS-IT220-EBE-24.elasticbeanstalk.com ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.DateCreated: 20150721T230321Z ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.DateUpdated: 20150721T231004Z ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.Description: Initial environment description. ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.EndpointURL: 54.243.135.159 ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.EnvironmentId: e-nfmuvhyf3j ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.EnvironmentName: TE-TAWS-IT220-EBE-24 ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.Health: Green ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.SolutionStackName: 64bit Amazon Linux 2015.03 v1.4.0 running Docker 1.6.0 ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.Status: Ready ... custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.TemplateName: null ...
        • (info) If not specified, the CNAME is generated automatically by appending a random alphanumeric string to the environment name.
        Configuration Source

        (Optional) Select a preconfigured platform, a custom platform, or a saved configuration.

        Solution StackSelect or specify the solution stack.
        • (info) There might be more recent solution stacks available, refer to Supported Platforms for details – you can enter an updated version manually.
        Platform ARNSpecify the ARN of the custom platform.
        • (info) Custom platforms are region specific and need to be deliberately created, refer to Custom Platforms for details.
        Template NameSpecify the template name.
        • (info) Saved configurations are YAML formatted templates and can be created manually or via the AWS Management Console, refer to Saved Configurations for details.
        Advanced Options 
        Await Health Status Timeout Specify how long to await the environment's health status reaching a non grey state (seconds, default is 600, use 0 to skip).
        Verify Green Health Status PeriodSpecify how long to verify the environment's health status being green (seconds, default is 180, use 0 to skip).
        Configuration Option Settings

        (Optional) Configure the environment's option settings.

        • Refer to Option Values for available configuration option settings.

        Tags

        (Optional) Tag the environment's resources.

        Description(Optional) Describe the environment.

        Update Environment


        Info
        titleUnmodified option handling

        Any option that is not populated in the task will not be updated in the environment (i.e. nothing is sent to Beanstalk for this option, which retains its current value accordingly).


        Environment Name or ID or CNAME 

        Specify the target environment. You can use its name, ID or the associated CNAME.

        • (info) CNAME needs to be the fully qualified domain name, e.g. "someEnv.elasticbeanstalk.com"
        Version Label

        see Create above

        Configuration Source

        see Create above

        Solution Stacksee Create above
        Platform ARNsee Create above
        Template Namesee Create above
        Advanced Options

         

        Await Health Status Timeout see Create above
        Verify Green Health Status Periodsee Create above
        Configuration Option Settings

        see Create above 

        Tagssee Create above
        Descriptionsee Create above

        Rebuild Environment

         

        Environment Name or ID or CNAME see Update above
        Advanced Options

         

        Await Health Status Timeout see Create above
        Verify Green Health Status Periodsee Create above

        Restart Environment

         

        Environment Name or ID or CNAME see Update above
        Advanced Options

         

        Await Health Status Timeout see Create above
        Verify Green Health Status Periodsee Create above

        Swap Environment CNAMEs


        Info

        The Swap action enables Deploying Versions with Zero Downtime  by swapping the URLs between two environments - this concept is also referred to as a Blue-Green deployments. 


        Tip
        titleAWS recommends rolling updates

        If your application architecture and deployment scenario allow to use rolling updates, AWS nowadays recommends this approach over a CNAME swap. In case, you can specify the desired deployment method via the Configuration Option Settings in section Advanced Options of the Create and Update actions. Refer to Deploying Applications to AWS Elastic Beanstalk Environments for a comparison of available deployment methods, to Deployment Policies and Settings for more details on rolling updates, and to The aws:elasticbeanstalk:command namespace for the available configuration options.


        Source Environment Name or ID or CNAME 

        Specify the source environment. You can use its name, ID or the associated CNAME.

        • (info) CNAME needs to be the fully qualified domain name, e.g. "someBlueEnv.elasticbeanstalk.com"
        Destination Environment Name or ID or CNAME
        Specify the target environment. You can use its name, ID or the associated CNAME.
        • (info) CNAME needs to be the fully qualified domain name, e.g. "someGreenEnv.elasticbeanstalk.com"

        Terminate Environment

         
        Environment Name or ID or CNAME 

        see Update above

        Don't fail for non existing environmentCheck to not fail the build, if the environment does not exist (anymore). Clear to trigger a build failure otherwise.
        Terminate Resources

        Check to also terminate the associated AWS resources. Clear to remove the associated AWS resources from Elastic Beanstalk, but continue to operate them.


    Variables

    Include Page
    _VariablesNote
    _VariablesNote

    Create Environment

    Code Block
    languagetext
    linenumberstrue
    Creating common variables for 1 resources affected by task:
    ... bamboo.custom.aws.elasticbeanstalk.environment.resources
    .
    : e-nfmuvhyf3j
    .VersionLabel: null
    
    Creating 
    common
    resource variables for 
    first resource affected by task: Creating resource variables for environment 'TE-TAWS
    environment 'TE-TAWS-IT220-EBE-24' with environmentId 'e-nfmuvhyf3j':
    ... bamboo.custom.aws.elasticbeanstalk.environment.
    first
    resources.e-nfmuvhyf3j.ApplicationName: TEA-TAWS-IT220-EBE-24
    ... bamboo.custom.aws.elasticbeanstalk.environment.
    first
    resources.e-nfmuvhyf3j.CNAME: TAWS-IT220-EBE-24.elasticbeanstalk.com
    ... bamboo.custom.aws.elasticbeanstalk.environment.
    first
    resources.e-nfmuvhyf3j.DateCreated: 20150721T230321Z
    ... bamboo.custom.aws.elasticbeanstalk.environment.resources.
    first
    e-nfmuvhyf3j.DateUpdated: 20150721T231004Z
    ... bamboo.custom.aws.elasticbeanstalk.environment.
    first.Description
    resources.e-nfmuvhyf3j.Description: Initial environment description.
    ... bamboo.custom.aws.elasticbeanstalk.environment.resources.
    first
    e-nfmuvhyf3j.EndpointURL: 54.243.135.159
    ... bamboo.custom.aws.elasticbeanstalk.environment.resources.
    first
    e-nfmuvhyf3j.EnvironmentId: e-nfmuvhyf3j
    ... bamboo.custom.aws.elasticbeanstalk.environment.resources.
    first
    e-nfmuvhyf3j.EnvironmentName: TE-TAWS-IT220-EBE-24
    ... bamboo.custom.aws.elasticbeanstalk.environment.
    first
    resources.e-nfmuvhyf3j.Health: Green
    ... bamboo.custom.aws.elasticbeanstalk.environment.
    first.SolutionStackName
    resources.e-nfmuvhyf3j.HealthStatus: 
    64bit Amazon Linux 2015.03 v1.4.0 running Docker 1.6.0 ...
    Pending
    ... bamboo.custom.aws.elasticbeanstalk.environment.resources.
    first
    e-nfmuvhyf3j.
    Status
    PlatformArn: 
    Ready
    null
    ... bamboo.custom.aws.elasticbeanstalk.environment.
    first.TemplateName: null ... custom.aws.elasticbeanstalk.environment.first.VersionLabel: null Advanced Options Await Health Status Timeout Specify how long to await the environment's health status reaching a non grey state (seconds, 0 to skip).Verify Green Health Status PeriodSpecify how long to verify the environment's health status being green (seconds, 0 to skip).Configuration Option Settings

    (Optional) Configure the environment's option settings.

    • Refer to Option Values for available configuration option settings. 
    Tags

    (Optional) Tag the environment.

    • Refer to Tagging Your Amazon EC2 Resources and Listing and Filtering Your Resources for details. For example:

      Panel
      borderColorgrey
      • Single Instance Uses single-instance environment type instead of load-balanced.
      • Instance type Sets the configurations instance type to the desired size/type.
      • Auto Scaling rangeSets the Auto Scaling group instance number min and max sizes.
      • Worker Tier IAM Profile Defines the IAM instance profile to use for a worker tier configuration.
      • General Purpose (SSD) storage volume Defines the root storage volume for the Amazon EC2 instances in the environment as general purpose SSD.
    Description(Optional) Describe the environment.

    Update

    Info
    titleUnmodified option handling

    Any option that is not populated in the task will not be updated in the environment (i.e. nothing is sent to Beanstalk for this option, which retains its current value accordingly).

    Environment Name or ID or CNAME 

    Specify the target environment. You can use its name, ID or the associated CNAME.

    • (info) CNAME needs to be the fully qualified domain name, e.g. "someEnv.elasticbeanstalk.com"
    Version Label

    see Create above

    Configuration Source

    (Optional) Select a predefined solution stack or saved named template.

    Generated Variablessee Create aboveAdvanced Options

     

    Await Health Status Timeout see Create aboveVerify Green Health Status Periodsee Create aboveConfiguration Option Settings

    see Create above 

    Tagssee Create aboveDescriptionsee Create above

    Rebuild

     

    Environment Name or ID or CNAME see Update aboveGenerated Variablessee Create aboveAdvanced Options

     

    Await Health Status Timeout see Create aboveVerify Green Health Status Periodsee Create above

    Restart

     

    Environment Name or ID or CNAME see Update aboveGenerated Variablessee Create aboveAdvanced Options

     

    Await Health Status Timeout see Create aboveVerify Green Health Status Periodsee Create above

    Swap

    Tip

    The Swap action enables Deploying Versions with Zero Downtime  by swapping the URLs between two environments - this concept is also referred to as a Blue-Green deployments. 

    Source Environment Name or ID or CNAME 

    Specify the source environment. You can use its name, ID or the associated CNAME.

    • (info) CNAME needs to be the fully qualified domain name, e.g. "someEnv.elasticbeanstalk.com"
    Destination Environment Name or ID
    Specify the target environment. You can use its name or ID.Generated Variables
    Code Block
    languagetext
    linenumberstrue
    Creating resource variables for copied object 'taws-tst-object-4B.a.txt':
    ... custom.aws.s3.object.first.BucketName: taws-tst-target-us-east-1
    ... custom.aws.s3.object.first.ETag: 1dafad37f6d9e169248bacb8485fd9cc
    ... custom.aws.s3.object.first.ObjectKey: taws-tst-object-4B.a.txt
    ... custom.aws.s3.object.first.VersionId: null
    

    Terminate

     Environment Name or ID or CNAME 

    see Update above

    Don't fail for non existing environmentCheck to not fail the build, if the environment does not exist (anymore). Clear to trigger a build failure otherwise.Terminate Resources

    Check to also terminate the associated AWS resources. Clear to remove the associated AWS resources from Elastic Beanstalk, but continue to operate them.

    Generated Variablessee Create above

    Variables

    Include Page_VariablesNote_VariablesNote
    resources.e-nfmuvhyf3j.SolutionStackName: 64bit Amazon Linux 2015.03 v1.4.0 running Docker 1.6.0
    ... bamboo.custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.Status: Ready
    ... bamboo.custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.TemplateName: null
    ... bamboo.custom.aws.elasticbeanstalk.environment.resources.e-nfmuvhyf3j.VersionLabel: null
    Creating common variables for first resource affected by task:
    Creating resource variables for environment 'TE-TAWS-IT220-EBE-24' with environmentId 'e-nfmuvhyf3j':
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.ApplicationName: TEA-TAWS-IT220-EBE-24
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.CNAME: TAWS-IT220-EBE-24.elasticbeanstalk.com
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.DateCreated: 20150721T230321Z
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.DateUpdated: 20150721T231004Z
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.Description: Initial environment description.
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.EndpointURL: 54.243.135.159
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.EnvironmentId: e-nfmuvhyf3j
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.EnvironmentName: TE-TAWS-IT220-EBE-24
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.Health: Green
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.HealthStatus: Pending
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.PlatformArn: null
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.SolutionStackName: 64bit Amazon Linux 2015.03 v1.4.0 running Docker 1.6.0
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.Status: Ready
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.TemplateName: null
    ... bamboo.custom.aws.elasticbeanstalk.environment.first.VersionLabel: null
    

    Update Environment

    See Create above.

    Rebuild Environment

    See Create above.

    Restart Environment

    See Create above.

    Swap Environment CNAMEs

    Code Block
    languagetext
    linenumberstrue
    Creating common variables for source and destination resources affected by task:
    Creating resource variables for environment 'TE-TAWS-IT220-EBE-24' with environmentId 'e-nfmuvhyf3j':
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.ApplicationName: TEA-TAWS-IT220-EBE-24
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.CNAME: TAWS-IT220-EBE-24.elasticbeanstalk.com
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.DateCreated: 20150721T230321Z
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.DateUpdated: 20150721T231004Z
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.Description: Initial environment description.
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.EndpointURL: 54.243.135.159
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.EnvironmentId: e-nfmuvhyf3j
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.EnvironmentName: TE-TAWS-IT220-EBE-24
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.Health: Green
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.SolutionStackName: 64bit Amazon Linux 2015.03 v1.4.0 running Docker 1.6.0
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.Status: Ready
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.TemplateName: null
    ... bamboo.custom.aws.elasticbeanstalk.environment.source.VersionLabel: null
    Creating resource variables for environment 'TE-TAWS-IT220-EBE-25' with environmentId 'e-nfmuvhyf3k':
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.ApplicationName: TEA-TAWS-IT220-EBE-25
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.CNAME: TAWS-IT220-EBE-25.elasticbeanstalk.com
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.DateCreated: 20150721T231442Z
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.DateUpdated: 20150721T232108Z
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.Description: Initial environment description.
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.EndpointURL: 54.243.135.160
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.EnvironmentId: e-nfmuvhyf3k
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.EnvironmentName: TE-TAWS-IT220-EBE-25
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.Health: Green
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.SolutionStackName: 64bit Amazon Linux 2015.03 v1.4.0 running Docker 1.6.0
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.Status: Ready
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.TemplateName: null
    ... bamboo.custom.aws.elasticbeanstalk.environment.destination.VersionLabel: null

    Terminate Environment

    See Create above.

    How-to Articles

    Filter by label (Content by label)
    max8
    showSpacefalse
    sorttitle
    excerptTypesimple
    cqllabel in ("aws-cli","aws-elastic-beanstalk") and label in ("kb-how-to-article","kb-troubleshooting-article")

    Frequently Asked Questions (FAQ)

    Questionslist macro
    filterpopular
    asktrue
    limit8
    topicaws-elastic-beanstalk