How to Install EB CLI for AWS - dummies

How to Install EB CLI for AWS

By John Paul Mueller

In order to work with EB in AWS, you need an EB version of CLI. To obtain the needed software, open a command prompt or terminal window, type pip install –upgrade awsebcli, and press Enter. You see a relatively long list of messages followed by a success message.

To test your setup, type eb –help and press Enter.

check eb CLI installation
Check your eb CLI installation to ensure success.

Before you can use eb to perform useful work, you must initialize it. The following steps get you started.

  1. Type eb init and press Enter.
    The wizard asks you to select a region.
  2. Type the number corresponding to the region you want to use and press Enter.

    You need to choose the number corresponding to the region you seleced. The remaining steps assume that you did create the application and are choosing TestApp as your application. Creating a second application will incur costs, so use the existing application if possible.

  3. Type an application number and press Enter.

    The eb utility continues the configuration process. Unless you have source control setup, the process ends here. Otherwise, you need to follow the steps required to configure your particular kind of source control.

    choose app AWS
    Choose an existing application or create a new one.

After you install and configure eb CLI, you can perform all the same tasks with it as you do by using the console. The difference for a developer, of course, is that you can now script your tasks. For example, to see a list of all EB environments, you type eb list and press Enter.

You can start with a simple command and then refine it. If you want to know what refinements are available, add the --help argument after a command. For example, eb list --help shows the optional arguments for the list command.

Using eb isn’t limited to the AWS console or the command line, either. For example, when you type eb open and press Enter, you see the EB sites opened in a browser. If you want to see a specific site, you need to add the environment name, such as MyCompany-TestEnv, to the command. You can find a list of eb CLI commands at the AWS website.