Follow

ELB - Known Issue - Environment properties arent visible in the shell of my Elastic Beanstalk instance

Solution:

With the exception of stacks running PHP, environment properties are not automatically exported to the shell, even though are present in the instance. Instead, they are made available to the application through the stack it runs in, based on which platform you’re using.

The following are example locations for environment properties for a few of the available platforms:

Python: Environment properties are written to /opt/python/current/env, which is sourced into the virtualenv stack where the application runs. To set the source, log in to the instance and run the following command:

  ~$ source /opt/python/current/env

Ruby

Environment properties are first written to a JSON file tha contains all of the stack configuration information, found at /opt/elasticbeanstalk/deploy/configuration/containerconfiguration. When the predeployment hook at /opt/elasticbeanstalk/hooks/configdeploy/pre/10_setup_envvars.sh is triggered, /opt/elasticbeanstalk/support/envvars is populated. This file, which contains all of the environment properties, is then sourced by the stack to make the environment variables available to the application. To set the source, log in to the instance and run the following command:

  source /opt/elasticbeanstalk/support/envvars

Java

Environment properties you set at launch do not become shell environment variables, though they behave in a similar way. For more detailed information, see Configuring Your AWS Elastic Beanstalk Java Environment.

To view and set environment properties, use the eb_setenv AWS CLI command.

 

If you continue to experience difficulties, please open a case with the DLT Opscenter using the following contact information:

1-888-358-7658

Opscenter@dlt.com

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk