2.0.1 • Published 4 years ago

@salte-io/salte-lambda v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Salte Lambda

NPM Version NPM Downloads CI Build Coveralls

semantic-release

An opinionated wrapper for AWS Lambda that enables the use of Promises.

Install

You can install this package either with npm.

npm

$ npm install @salte-io/salte-lambda

Usage

const wrapper = require('@salte-io/salte-lambda');

exports.handler = wrapper((event, context) => {
  if (!event.body.myAttribute) {
    return Promise.reject({
      statusCode: 400,
      code: 'missing_my_attribute',
      message: '"myAttribute" is required!'
    });
  }

  return Promise.resolve({
    my_attribute: event.body.myAttribute
  });
});
2.0.1

4 years ago

2.0.0

6 years ago

1.0.3

6 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago