Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

help functions for aws lambda

An effort to enable single lambda handles functionally the same requests from different sources: console test, sns, sqs, api gateway and api invoke. It also addresses AWS lambda EMFILE issue.

The packages collects code and ideas from lambda-emfiles and aws-event. It includes few improvements and replaces both packages.

how to use

install

npm install @samwen/lambda-helper

example

'use strict';

const helper = require('@samwen/lambda-helper');

exports.lambdaHandler = async (event, context) => {
    helper.start_emfiles_verify();
    try {
        const {type, messages} = helper.get_type_messages(event, context);
        const data = {status: 'OK'};
        const response = helper.get_response(data);
        console.log(JSON.stringify({type, messages, response}));
        return response;
    } finally {
        helper.final_emfiles_check();
    }
};

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages