4.0.0 • Published 6 years ago

aws-lambda-env v4.0.0

Weekly downloads
521
License
MIT
Repository
github
Last release
6 years ago

aws-lambda-env Build Status

Extracts the environment of the lambda function.

Installation

$ npm install --save aws-lambda-env

Usage

var lambdaEnv = require('aws-lambda-env');

exports.handler = function(event, context) {
	var env = lambdaEnv(context);
	//=> 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

4.0.0

6 years ago

3.0.0

8 years ago

2.0.1

8 years ago

1.1.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago