Clean install pip:
sudo -i apt-get purge -y python3-pip wget https://bootstrap.pypa.io/get-pip.py python3 ./get-pip.py apt-get install python3-pip
Install AWS EB CLI:
sudo pip install awsebcli
Note: I got a "You are not authorized to perform this operation." error after entering the ssh key details. I could not get past it, so i uploaded the ssh key on the aws web ui.
Create an environment:
Deploy the application:
At that stage I sshed into the application and ran pending migrations:
eb ssh cd /var/app/current bundle exec rake db:migrate exit
Then I got the error message "An unhandled lowlevel error occurred. The application logs may have details." when trying to access the app.
It turned out. that I had to set the SECRET_KEY_BASE on eb.
rails secret eb setenv SECRET_KEY_BASE=<output of rails secret>
Detailed information can be found at: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-getting-started.html