AWS Elastic Beanstalk
Developer Guide
AWS services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with AWS services in China.

The Elastic Beanstalk Command Line Interface (EB CLI)

The EB CLI is a command line interface for Elastic Beanstalk that provides interactive commands that simplify creating, updating and monitoring environments from a local repository. Use the EB CLI as part of your everyday development and testing cycle as an alternative to the AWS Management Console.


The current version of the EB CLI has a different base set of commands than versions prior to version 3.0. If you are using an older version, see Migrating to EB CLI 3 and CodeCommit for migration information.

Once you've installed the EB CLI and configured a repository, you can create environments with a single command:

~/my-app$ eb create my-env

Previously, Elastic Beanstalk supported a separate CLI that provided direct access to API operations called the Elastic Beanstalk API CLI. This has been replaced with the AWS CLI, which provides the same functionality but for all AWS services' APIs.

With the AWS CLI you have direct access to the Elastic Beanstalk API. The AWS CLI is great for scripting, but is not as easy to use from the command line because of the number of commands that you need to run and the number of parameters on each command. For example, creating an environment requires a series of commands:

~$ aws elasticbeanstalk check-dns-availability --cname-prefix my-cname ~$ aws elasticbeanstalk create-application-version --application-name my-application --version-label v1 --source-bundle S3Bucket=my-bucket, ~$ aws elasticbeanstalk create-environment --cname-prefix my-cname --application-name my-app --version-label v1 --environment-name my-env --solution-stack-name "64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.2 (Passenger Standalone)"

For information about installing the EB CLI, configuring a repository, and working with environments, see the following topics: