AWS EB CLI Cheat Sheet – Elastic Beanstalk

In this post we will discuss about the Elastic Beanstalk CLI called EB CLI.

If you are new to Elastic Beanstalk, it’s recommended that you go through this free AWS Elastic Beanstalk crash course.

If you want to manage Elastic Beanstalk using traditional AWS CLI follow this post .

Installation

Follow these guides to install eb cli on Windows, Linux and MacOS .

Get help

eb -h

Initialize eb cli

eb init

It will ask questions:-

  • Default region
  • Access key details
  • Select existing application or create new.
  • Application name
  • Platform e.g. PHP, Python etc.
  • Setup ssh
  • Select keypair or create one.

Create environment

eb create

Check status

eb status

Check health information

eb health

Check events

eb events

Pull logs

eb logs

Open environment website in browser

eb open

Deploy Update

eb deploy

Check configuration options

eb config

Terminate environment

eb terminate

List  environments

eb list

Change current environment

eb use cldvds-env
Below are some other useful commands
eb abort Cancel deployment
eb appversion Manage EB application versions
eb clone Create clone of environment
eb console Open environment in AWS console
eb labs Extra commands for experiment
eb local Run commands on local machine
eb platform Manage platform
eb printenv Show environment variables
eb restore rebuild a terminated environment
eb scale Scaling the number of instances.
eb setenv Set environment variables
eb ssh Connect to instance via ssh
eb swap Swap CNAME of two environments
eb tags Modify environment tags
eb upgrade Update the platform to most recent version

Above list is created by referring the AWS doc for elastic beanstalk cli . If you have any query or concern please feel free to contact us.

Leave a Reply

Your email address will not be published. Required fields are marked *