# lambda-cloudformation-response

> Send a response from an AWS Lambda function in response to a CloudFormation custom resource request

Latest version **1.0.0** (published 2016-09-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install lambda-cloudformation-response
pnpm add lambda-cloudformation-response
yarn add lambda-cloudformation-response
bun add lambda-cloudformation-response
```

## 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 | 1.0.0 |
| Published | 2016-09-28 |
| First published | 2016-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | aws, cloudformation, lambda, request, http |

## Links

- npm: https://www.npmjs.com/package/lambda-cloudformation-response
- Repository: https://github.com/bendrucker/lambda-cloudformation-response
- Homepage: https://github.com/bendrucker/lambda-cloudformation-response#readme
- Issues: https://github.com/bendrucker/lambda-cloudformation-response/issues
- npm.io page: https://npm.io/package/lambda-cloudformation-response

## Dependencies (1)

- [got](https://npm.io/package/got.md) ~6.5.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-09-28

## README

# lambda-cloudformation-response [![Build Status](https://travis-ci.org/bendrucker/lambda-cloudformation-response.svg?branch=master)](https://travis-ci.org/bendrucker/lambda-cloudformation-response)

> Send a response from an [AWS Lambda](https://aws.amazon.com/lambda/) function in response to a [CloudFormation custom resource](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources-lambda.html) request


## Install

```
$ npm install --save lambda-cloudformation-response
```


## Usage

In your Lambda 

```js
var respond = require('lambda-cloudformation-response')

exports.handler = function (event, context) {
  doWork()
    .then(function (result) {
      return respond(event, context, 'SUCCESS', result)  
    })
}
```

## API

#### `respond(event, context, status, [data])` -> `promise`

##### event
##### context

*Required*  
Type: `object`

The event and context objects supplied by Lambda to a handler.

##### status

*Required*  
Type: `string`  
Values: `'SUCCESS', 'FAILURE'`

A CloudFormation resource status string.

##### data

Type: `object`

Optional data to return to CloudFormation as resource results. These results can be retrieved elsewhere in the stack using the `Fn::GetAtt` function.


## License

MIT © [Ben Drucker](http://bendrucker.me)

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