AWS Classroomnotes 15/Oct/2022

AWS Elastic Beanstalk from Command Line

  • Lets take a sample python based application and deploy this into elastic beanstalk
  • I would like to deploy from command line

Setting up AWS CLI

curl "" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
  • Ubuntu Linux:
    • Lets create the keypair with pem file
    • Create ec2 instance with size t2.micro with key pair created above
  • Now ensure you have Windows Powershell (latest update on Windows 10/Windows 11). If you are working on earlier versions of windows ensure atlest gitbash is installed. Refer Here
  • For Mac users => Launch Terminal
  • The command to login ssh -i <path to pem> ubuntu@<publicip>
  • Installing AWS CLI on ubuntu:
sudo apt update
sudo apt install unzip -y
curl "" -o ""
sudo ./aws/install
  • Now verify the installation using aws --version
  • Now create an IAM user Refer Here
  • Login into ec2 instance and execute aws configure. Enter access key, secret access key, region (us-west-2)
  • Now we need to verify access aws s3 ls this command should not throw error
  • Now we need to install elastic beanstalk cli eb-cli
    • Approach 1 Refer Here
    • Approach 2 Refer Here
      sudo apt install python3-pip -y
    • Now install eb-cli pip install awsebcli --upgrade --user
    • Now we need to set the path
    • Add export PATH=~/.local/bin:$PATH to ~/.bashrc
    • Now logout and login eb --version
  • New to linux: Understand the following
    • sudo
    • apt
    • PATH variable and its importance
    • vi editor

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner