How to Install EB CLI for AWS
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.
Before you can use eb to perform useful work, you must initialize it. The following steps get you started.
- Type eb init and press Enter. The wizard asks you to select a region.
- 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.
- 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.
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
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.