Reputation: 1158
The question is simple: I have some Environment Properties (also called Environment Variables by many) in my AWS instace. As far I know, I can access those properties in my .config file inside the .ebextensions folder, but there is any way to access those properties from Java or PHP?
Upvotes: -1
Views: 1158
Reputation: 669
In elastic beanstalk Java container the environment variables are set as system properties, so you have to do this for Java: System.getProperty("myPropName")
Upvotes: 1
Reputation: 18918
Yes you can use standard methods for accessing values of environment variables defined in Elastic Beanstalk.
So for Java you could use System.getenv("MY_VAR")
and getenv
for php.
Upvotes: 3