How to create Environment variables in Eclipse, JAVA and AWS Lambda

To test the code with environment variables you can use the following steps to create environment variables in Eclipse

  1. Goto Run -> Click Run configuration

2. Goto the table “Environment”

3. Fill the key and value

4. Use environment variable as

System.getEnvironment("<key>")

It will return the value of the environment.


Steps to create environment variable in AWS Lamda

  1. Goto AWS console
  2. Choose Lambda function
  3. Choose “Environment variables” tab
  4. Fill the key value as the following pic
Like what you read? Give #Muthupandian (μ) a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.