If you set up RDS with ElasticBeanstalk how can you go into the box (via eb ssh
) and view the environment variables that are set when you apply RDS to your EB Instance?
Amazon automatically sets up these environment variables.
RDS_DB_NAME
RDS_USERNAME
RDS_PASSWORD
RDS_HOSTNAME
RDS_PORT
It seems that you can only view in the process that runs your application.
I'd like to view these via the terminal some way, the eb printenv
command does not show them.
Best Answer
Here's how to do it.
First
ssh
into the eb instance.Then un the following command
Alternatively
--output YAML
can be--output json
.Or if you want you can pipe the variables into a node command like this:
And use
source
to have.ebextension
scripts get access to the env variables.