Get ready using AWS Elastic Beanstalk by installing the CLI and upgrading your git workflow.

Installation

This is how you do it:

  • check that python is installed (install it from python.org)
python --version
  • install pip for easy module installation with python (here’s how)
  • install virtualenv to have your eb-cli install isolated
(sudo) pip install virtualenv
  • finally install eb-cli
# create a new virtual environment for eb-cli
virtualenv ~/ebenv
# change into the new environment
source ~/ebenv/bin/activate
# install eb-cli
pip install awsebcli
# leave the environment
deactivate
# link the cli for path access
sudo ln -s ~/ebenv/bin/eb /usr/local/bin/
  • check that everything installed fine
eb --version

Setup

Now that you’re ready to go, change into a git repository and initialize EB:

eb init
  • checkout your production branch and link it to an EB environment (list them with eb list):
git checkout production
eb use my_app_production

now you can deploy changes, check status, get logs and much more:

eb deploy
eb status
eb logs
...

You can find out more about the EB-CLI here.