lambda-cloudformation-response

1.0.0 • Public • Published

lambda-cloudformation-response Build Status

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

Install

$ npm install --save lambda-cloudformation-response

Usage

In your Lambda

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

Package Sidebar

Install

npm i lambda-cloudformation-response

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bendrucker