1.0.0 • Published 5 years ago

lambda-nodejs-response-helper v1.0.0

Weekly downloads
79
License
MIT
Repository
-
Last release
5 years ago

Response helpers for AWS Lambda (nodejs)

Helper functions to create response objects for AWS Lambda

npm.io

Installation

npm install --save github:egeniq/lambda-nodejs-response-helper

Usage

'use strict';

const {createJsonResponse} = require('lambda-nodejs-response-helper');

module.exports.hello = async (event) => {
  return createJsonResponse(
    200,
    {
      message: 'Go Serverless v1.0! Your function executed successfully!',
      input: event,
    },
    {
      'X-Custom-Header': 'Foobar'
    }
  );
};