fsinisi90
fsinisi90

Reputation: 1158

It is possible to read AWS Environment Properties from Java or PHP?

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

Answers (2)

k.liakos
k.liakos

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

Rohit Banga
Rohit Banga

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

Related Questions