AWS Classroomnotes 21/Feb/2022

Deploying a Python Webapp (Flask) to elastic beanstalk

  • Lets create an IAM user with programmatic access (cli or sdk).
  • Refer Here for creating IAM user
  • Install AWS ClI
  • Refer Here for video demonstration
  • Refer Here
  • After AWS Installation & Configuring IAM User on AWS CLI
aws configure

Preview
* Install elastic beanstalk cli Refer Here. We will be using the manual approach Refer Here
* Install Python
* Windows choco install python or Refer Here
* mac brew install python@3.9
* Now install ebcli using pip install awsebcli --upgrade --user
* Now add eb to the path Refer Here
* Refer Here for the code used in the sample application
* Now run the application locally flask run
Preview
* Now lets try to deploy this to the elastic beanstalk using eb cli Refer Here for the basic command help and documentation
* Now execute eb platform list --region us-west-2 and we selected python-3.8
* Now navigate to your project root folder and execute eb init sample-flask-app -p python-3.8 --region us-west-2
* Now Create an environment and deploy the application with eb create
Preview
* Once your deployment is succesfull, we can open our application using eb open
* with eb cli commands we are able to create environment and application version from cli
Preview
* As of now health is degraded, which we will fix in our next session
* To clean up eb terminate sample-flask-app
Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube