How can I update a python Flask app on elastic beanstalk?

This is my first python-Flask app on AWS. It has caused headaches.

The procedure that I have followed is:

mkdir myapp && cd myapp
virtualenv venv
source venv/bin/activate
pip install Flask SQLAlchemy twilio psycopg2 
pip freeze > requirements.txt
mkdir .ebextensions
cd .ebxtensions
nano application.config #content of this file below
    postgresql93-devel: []

  - option_name: MANDRILL_APIKEY
    value: my_value
  - option_name: MANDRILL_USERNAME
    value: my_email_address
cd ..
eb init
eb create

After a whole range of problems, including with options settings and psycopg2, the above worked.

Now the issue is how to update when I make changes to the app on my local machine. I have tried as follows:

git init
eb init
git add .
git commit -m "my first update"
git aws.push

which does not work and returns error message saying that "git aws.push" is not a legal command (or something like that). I have also tried "eb push".

So 2 questions here:

  1. Why is the above procedure with git failing?
  2. What is the correct way to push updates or changes to elastic beanstalk?

Thank you, all help gratefully received.


If you're using the most recent (3+) release of the Elastic Beanstalk command line tool, the way to push updates is "eb deploy". Earlier versions used "eb push".

Need Your Help

Is it okay to perform async operations without anybody "knowing" about it?

c# .net visual-studio asynchronous

I'm using a COM library with RCWs. I've always found it's a best practice to manually release any unmanaged resources and garbage collect before they go out of scope. I don't want this to "slow d...

How to change language in genymotion simulator by shell command

shell genymotion

I've a question, does anyone know how to change genymotion language using shell script?