AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)
« 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.Did this page help you?  Yes | No |  Tell us about it...

Creating New Application Versions

You can create different versions for an application. Each application version consists of a unique file (WAR file or ZIP file), as well as contextual information about the version. This topic describes how to create a new version of an existing AWS Elastic Beanstalk application and deploy it to an existing environment. You may want to do this if, for instance, you have updated your application and want to re-deploy it to your testing environment. For information on how to create new application versions using the AWS Toolkit for Eclipse, see Creating and Deploying AWS Elastic Beanstalk Applications in Java Using AWS Toolkit for Eclipse. For more information on how to create new application versions for PHP, see Deploying AWS Elastic Beanstalk Applications in PHP. For more information on how to create new application versions using the AWS Toolkit for Visual Studio, see Creating and Deploying AWS Elastic Beanstalk Applications in .NET Using AWS Toolkit for Visual Studio.

Note

For information on creating a new application, see Creating New Applications.

AWS Management Console

To create a new application version

  1. Open the AWS Elastic Beanstalk console at https://console.aws.amazon.com/elasticbeanstalk/.

  2. From the region list, select the region that includes the application that you want to work with.

  3. From the AWS Elastic Beanstalk console applications page, click the name of the application to which you want to add a new application version.

  4. In the navigation pane, click Application Versions.

  5. Click Upload.

    • Enter a label for this version in the Version label field.

    • (Optional) Enter a brief description for this version in the Description field.

    • Click Browse to specify the location of the application version (.war or .zip file).

      Note

      AWS Elastic Beanstalk supports only a single .war file for a Java application version and only a single .zip file for other applications. The file size limit is 512 MB.

    • Click Upload.

    The file you specified is associated with your application. You can deploy the application version to a new or existing environment. For more information, see Launching New Environments or Deploying Versions to Existing Environments

CLI

To create a new application version

  1. Create a new application version.

    PROMPT> elastic-beanstalk-create-application-version -a [Application Name] -l [Version Label] -d [Description] -s [Source Location]

  2. Update your existing environment.

    PROMPT> elastic-beanstalk-update-environment -e [Environment Name] -l [Version Label] -d [Description]

  3. Determine if the new environment is Green and Ready.

    PROMPT> elastic-beanstalk-describe-environments -e [Environment Name]

    If the new environment does not come up Green and Ready, you should decide if you want to retry the operation or leave the environment in its current state for investigation. Make sure to terminate the environment after you are finished, and clean up any unused resources.

    Note

    You can adjust the timeout period if the environment doesn't launch in a reasonable time.

API

To create a new application version

  1. Call CreateApplicationVersion with the following parameters:

    • ApplicationName = SampleApp

    • VersionLabel = Version2

    • Description = description

    • SourceBundle.S3Bucket = <your bucket name>

    • SourceBundle.S3Key = <your application file name>

    • AutoCreateApplication = true

    Example

    https://elasticbeanstalk.us-east-1.amazon.com/?ApplicationName=SampleApp
    &VersionLabel=Version2
    &Description=description
    &SourceBundle.S3Bucket=amazonaws.com
    &SourceBundle.S3Key=sample.war
    &AutoCreateApplication=true
    &Operation=CreateApplicationVersion
    &AuthParams        

  2. Call UpdateEnvironment with the following parameters:

    • EnvironmentName = SampleAppEnv

    • VersionLabel = Version2

    • Description = description

    • TemplateName = MyConfigTemplate

    Example

    https://elasticbeanstalk.us-east-1.amazon.com/?EnvironmentName=mysampleappenv
    &TemplateName=myconfigtemplate
    &Description=description
    &VersionLabel=Version2
    &Operation=UpdateEnvironment
    &AuthParams  

  3. Call DescribeEnvironments with the following parameter:

    • EnvironmentName = SampleAppEnv

    Example

    https://elasticbeanstalk.us-east-1.amazon.com/?EnvironmentName=SampleAppEnv
    &Operation=DescribeEnvironments
    &AuthParams