New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cfn-response-promise

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cfn-response-promise

wrap cfn-response in promise to support await/async style lambda in cloudformation custom resource

1.1.0
latest
Source
npm
Version published
Weekly downloads
7.3K
-8.96%
Maintainers
1
Weekly downloads
 
Created
Source

cfn-response-promise module

Promise wrapped version of cfn-response.

Why

to support the async await pattern that nodejs8.10 runtime provides.

The response.send method returns promise, so now you can write:

const response = require('cfn-response-promise')

exports.main = async (event, content) => {

    return await response.send(event, context, response.SUCCESS, returnData);

}

Original cfn-response text

This module contains functions that respond on behalf of custom resources you create using AWS CloudFormation.

The module includes a send method, which sends a response object to a custom resource by way of a ResponseURL, which is an Amazon S3 pre-signed URL.

Any Lambda function using this module stops running after executing the module's send method.

For more information, read the AWS documentation here

Keywords

cfn-response

FAQs

Package last updated on 05 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts