Extracts the environment of the lambda function.
Installation
$ npm install --save aws-lambda-env
Usage
var lambdaEnv = ; exports { var env = ; //=> production};
API
lambdaEnv(context, [options])
Returns the alias or version of the lambda invocation. Returns undefined
if $LATEST
is executed.
context
Type: object
Context of the lambda function.
options
Type: object
Default: {$LATEST: 'development', default: 'production'}
Maps the function version to a specific stage. If the version is not present in the map, it will pick the default
value.
License
MIT © Sam Verschueren