# aws-lambda-env

> Extracts the environment of the lambda function

Latest version **4.0.0** (published 2018-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install aws-lambda-env
pnpm add aws-lambda-env
yarn add aws-lambda-env
bun add aws-lambda-env
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2018-01-29 |
| First published | 2015-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sam Verschueren |
| Maintainers | samverschueren |
| Keywords | aws, lambda, environment, env |

## Links

- npm: https://www.npmjs.com/package/aws-lambda-env
- Repository: https://github.com/SamVerschueren/bragg-env
- Homepage: https://github.com/SamVerschueren/bragg-env#readme
- Issues: https://github.com/SamVerschueren/bragg-env/issues
- npm.io page: https://npm.io/package/aws-lambda-env

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2018-01-29
- 3.0.0 — 2016-01-18
- 2.0.1 — 2016-01-07
- 1.1.0 — 2015-09-24
- 1.0.2 — 2015-09-02
- 1.0.1 — 2015-09-01
- 1.0.0 — 2015-09-01

## README

# aws-lambda-env [![Build Status](https://travis-ci.org/SamVerschueren/aws-lambda-env.svg?branch=master)](https://travis-ci.org/SamVerschueren/aws-lambda-env)

> Extracts the environment of the lambda function.


## Installation

```
$ npm install --save aws-lambda-env
```


## Usage

```js
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](https://github.com/SamVerschueren)

---
_Source: https://npm.io/package/aws-lambda-env · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
