Skip to content

Environment Variables #191

@hscheckenbacher

Description

@hscheckenbacher

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions