Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 1.32 KB

File metadata and controls

27 lines (18 loc) · 1.32 KB

FireTail Javascript Lambda Middleware

Overview

The purpose of this module is to correctly log out the AWS Lambda event and response payload to allow the FireTail extension to then send it on to the FireTail logging API.

Code Coverage codecovLicense: LGPL v3

The npm version is a function that wraps around an event handler function in a AWS Lambda to extract the event and response payloads into a base64 logging message.

Installation

Install the module into your project.

Implementing Middleware in lambda function:

import * as firetailWrapper from "@public.firetail.io/firetail-js-lambda";

module.exports.myFn = firetailWrapper((event, context) => {
  // do work here..
  return {
    statusCode: 200,
    body: JSON.stringify(data),
  };
});