-
Notifications
You must be signed in to change notification settings - Fork 185
Description
Would it be possible to enhance the CLI to allow for environment variables to be set according to the new Lambda capability? I see them being injected above my script code in the form:
process.env["VAR"]='Value'
However when generating the skeleton for the update-function-configuration there is a new section now for environment that would allow those to be injected:
{
"FunctionName": "",
"Role": "",
"Handler": "",
"Description": "",
"Timeout": 0,
"MemorySize": 0,
"VpcConfig": {
"SubnetIds": [
""
],
"SecurityGroupIds": [
""
]
},
"Environment": {
"Variables": {
"KeyName": ""
}
},
"Runtime": "",
"DeadLetterConfig": {
"TargetArn": ""
},
"KMSKeyArn": ""
}
This would make things a lot easier since I can manage the values encrypted on the build machine.
I noticed that environment variables disappear after deploy (from my AWS Lambda Console and I also notice them missing during execution) - if I set them on the Console and then deploy function with node-lambda.