Set environment variables in AWS Lambda

0 votes

I am planning to create an application which I want to run as AWS Lambda function. Part of the application creation process involves the use of environmental variables. 

Problem is I have no idea how to set up environmental variables for AWS Lambda instances.

So, any suggestions?

Dec 31, 2018 in AWS by datageek
• 3,000 points
391 views

1 answer to this question.

0 votes

You can specify environment variables for AWS Lambda either using AWS Console or CLI. You can actually use the below code to set up Lambda with an LD_LIBRARY_PATH environment variable using AWS CLI:

aws lambda create-function \
  --region us-east-1
  --function-name myTestFunction
  --zip-file fileb://path/package.zip
  --role role-arn
  --environment Variables={LD_LIBRARY_PATH=/usr/bin/test/lib64}
  --handler index.handler
  --runtime nodejs4.3
  --profile default

You can refer to this - AWS Lambda Environment Variables to know more

answered Dec 31, 2018 by Archana
• 5,480 points

Related Questions In AWS

0 votes
1 answer

How to access AWS Lambda environment variables using Java?

In Spring Core change the PropertySourcesPlaceholderConfigurer class can ...READ MORE

answered Oct 24, 2018 in AWS by Priyaj
• 56,160 points
429 views
+3 votes
3 answers
0 votes
1 answer

Python Pusher in AWS Lambda

Using virtualenv to keep track of dependencies will be ...READ MORE

answered May 30, 2018 in AWS by Cloud gunner
• 4,260 points
139 views
0 votes
1 answer
0 votes
1 answer
+2 votes
3 answers
0 votes
1 answer

How to set up AWS credentials in AWS Powershell?

First, of all the tools installed to ...READ MORE

answered Nov 22, 2018 in AWS by Archana
• 5,480 points
310 views