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

Eb CLI 2.6 (deprecated)

Note

This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see The Elastic Beanstalk Command Line Interface (EB CLI).

This section describes how to set up eb 2.6 and how to create a sample application using eb. This section also includes a command reference for eb 2.6.

Differences from version 3 of the EB CLI

EB and Eb are command line interface (CLI) tools for Elastic Beanstalk that you can use to deploy applications quickly and more easily. The most recent tool that Elastic Beanstalk supports is EB CLI 3. Elastic Beanstalk also supports eb 2.6 for customers who previously installed and continue to use it. You can use EB CLI 3 to manage environments that you launched using eb 2.6 or earlier versions of eb. EB CLI will automatically retrieve settings from an environment created using eb if the environment is running. Unlike eb, EB CLI does not store option settings locally.

EB CLI introduces the commands eb create, eb deploy, eb open, eb console, eb scale, eb setenv, eb config, eb terminate, eb clone, eb list, eb use, eb printenv, and eb ssh. In EB CLI 3.1 or later, you can also use the eb swap command. In EB CLI 3.2 only, you can use the eb abort, eb platform, and eb upgrade commands. In addition to these new commands, EB CLI 3 commands differ from eb 2.6 commands in several cases:

  • eb init – You use eb init to create an .elasticbeanstalk directory in an existing project directory and create a new Elastic Beanstalk application for the project. Unlike with eb, running eb init with EB CLI does not prompt you to create an environment.

  • eb start – EB CLI does not include the command eb start. Instead, you use eb create to create an environment.

  • eb stop – EB CLI does not include the command eb stop. Instead, you use eb terminate to completely terminate an environment and clean up.

  • eb push and git aws.push – EB CLI does not include the commands eb push or git aws.push. The commands have been replaced with the command eb deploy.

  • eb update – EB CLI does not include the command eb update. You use the command eb config to update an environment.

  • eb branch – EB CLI does not include the command eb branch.

For more information about using EB CLI 3 commands to create and manage an application, go to EB CLI Command Reference. For a command reference for eb 2.6, see EB CLI 2 Commands. For a walkthrough of how to deploy a sample application using EB CLI 3, see Managing Elastic Beanstalk Environments with the EB CLI. For a walkthrough of how to deploy a sample application using eb 2.6, see Getting Started with Eb. For a walkthrough of how to use eb 2.6 to map a Git branch to a specific environment, see Deploying a Git Branch to a Specific Environment.

On this page:

  • Differences from version 3 of the EB CLI
  • Getting Started with EbGetting Started with Eb Eb is an Elastic Beanstalk command line interface for deploying applications quickly and easily. This walkthrough uses eb to launch an application, view it, update it, and delete it. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see . Eb is a command line interface (CLI) tool that asks you a series of questions and uses your answers to deploy and manage Elastic Beanstalk applications. This section provides an end-to-end walkthrough using eb to launch a sample application, view it, update it, and then delete it. To complete this walkthrough, you will need to download the command line tools at the AWS Sample Code & Libraries website. For a complete CLI reference for more advanced scenarios, see , and see for instructions on how to get set up.
  • Step 1: Initialize Your Git Repository
  • Step 2: Configure Elastic Beanstalk
  • Step 3: Create the Application
  • Step 4: View the Application
  • Step 5: Update the Application
  • Step 6: Clean Up
  • Deploying a Git Branch to a Specific EnvironmentDeploying a Branch to an Environment You can use the eb command line interface and AWS DevTools to deploy your current git branch to a specific Elastic Beanstalk environment. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see . Developers often use branching in a project to manage code intended for different target environments. For example, you might have a test branch where you perform component or integration testing and a prod branch where you manage the code for your live or production code. With version 2.3 and later of the eb command line interface and AWS DevTools, you can use the eb init command to configure the eb push command to push your current git branch to a specific Elastic Beanstalk environment. To set up a Git branch to deploy to a specific environment Make sure you have version 2.3 of the Elastic Beanstalk command line tools installed. To check what version you have installed, use the following command: eb --version To download the command line tools, go to Elastic Beanstalk Command Line Tool page and follow the instructions in the README.txt file in the .zip file. From a command prompt, change directories to the location of the local repository containing the code you want to deploy. If you have not set up a Git repository, you need to create one to continue. For information about how to use Git, see the Git documentation. Make sure that the current branch for your local repository is the one you want to map to an Elastic Beanstalk environment. To switch to a branch, you use the git checkout command. For example, you would use the following command to switch to the prod branch. git checkout prod For more information about creating and managing branches in Git, see the Git documentation. If you have not done so already, use the eb init command to configure eb to use Elastic Beanstalk with a specific settings for credentials, application, region, environment, and solution stack. The values set with eb init will be used as defaults for the environments that you create for your branches. For detailed instructions, see . Use the eb branch command to map the current branch to a specific environment. Type the following command. eb branch When prompted for an environment name, enter the name of the environment that you want to map to the current branch. The eb command will suggest a name in parentheses and you can accept that name by pressing the Enter key or type the name that you want. The current branch is "myotherbranch". Enter an Elastic Beanstalk environment name (auto-generated value is "test-myotherbranch-en"): You'll notice that eb displays the current branch in your Git repository so you know which branch you're working with. You can specify an existing environment or a new one. If you specify a new one, you'll need to create it with the eb start command. When prompted about using the settings from the default environment, type y unless you explicitly don't want to use the optionsettings file from the default environment for the environment for this branch. Do you want to copy the settings from the default environment "main-env" for the new branch? [y/n]: y If you specified a new environment for your branch, use the eb start command to create and start the environment. When this command is successful, you're ready for the next step. Use the eb push command to deploy the changes in the current branch to the environment that you mapped to the branch. Eb Common Options Use these common options for all operations in the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see . This section describes options common to all eb operations. Name Description -f, --force Skip the confirmation prompt. - h, --help Show the Help message. Type: String Default: None --verbose Display verbose information. --version Show the program's version number and exit. EB CLI 2 Commands List of operations available for the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see . You can use the EB command line interface to perform a wide variety of operations. Eb stores environment settings in the .elasticbeanstalk/optionsettings file for the repository. It is designed to read only from local files. When you run eb start or eb update, Elastic Beanstalk reads the .elasticbeanstalk/optionsettings file and provides its contents as parameters to the CreateEnvironment or UpdateEnvironment API actions. You can use a configuration file in an .ebextensions/*.conf directory to configure some of the same settings that are in an .elasticbeanstalk/optionsettings file. However, the values for the settings in .elasticbeanstalk/optionsettings will take precedence over anything in .ebextensions/*.conf if the settings are configured in both. Additionally, any option setting that is specified using the API, including through eb, cannot later be changed in an environment using .ebextensions configuration files. When you run eb branch, Elastic Beanstalk will either add a section to the values in .elasticbeanstalk/optionsettings or create a new one for a new environment. The command does not affect any running environments. To view your current settings, run eb status --verbose. You might also want to use eb in conjunction with the Elastic Beanstalk console to get a complete picture of your applications and environments. branch Creates a git branch or changes the branch for the environment using the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • Example
  • delete Deletes the current application along with associated versions and configurations using the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • Example
  • events Returns the most recent events for the environment using the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • Example
  • init Initializes the eb command line interface and walks you through setting up a new AWS Elastic Beanstalk application. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • Example
  • logs Returns logs for your environment using the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • push Deploys the current application from the git repository using the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • Example
  • start Creates and deploys the current application using the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • Example 1
  • Example 2
  • status Describes the status of the current application using the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • Example 1
  • Example 2
  • stop Terminates the environment using the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • Example1
  • Example 2
  • update Updates the environment using the eb command line interface. This version of the EB CLI and its documentation have been replaced with version 3. Version 3 has different commands and is not backwards compatible with version 2. For information on the new version, see .
  • Description
  • Syntax
  • Options
  • Output
  • Example