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
• 2,830 points
251 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,280 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,100 points
293 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,240 points
114 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,280 points
205 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.