I have a python application on an Elastic Beanstalk EC2 instance which is connected to an PostgreSQL RDS.
My application works fine and uses the environment variables th
I figured it out this morgning:
The environment variables are not set within the virtualenv, but by another script. First you have to activate the virualenv, then you need to load the variables by activating the env script in the 'current' directory. Like this:
source /opt/python/run/venv/bin/activate
source /opt/python/current/env
The Beanstalk RDS variables are now set and ready to use by any script you execute in SSH.