JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 801
  • Score
    100M100P100Q97813F
  • License MIT

Extracts the environment of the lambda function

Package Exports

  • aws-lambda-env

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (aws-lambda-env) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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) || 'staging';

    console.log(env);
    //=> 'production'
};

API

lambdaEnv(context)

Returns the alias or version of the lambda invocation. Returns undefined if $LATEST is executed.

context

Type: object

The context of the lambda function.

License

MIT © Sam Verschueren