@tsnobip/reason-lambda

0.2.0 • Public • Published

Reason-Lambda

reason-lambda is a set of bindings for AWS Lambda handlers. It makes use of Bucklescript 7 representation of records as JS objects. It includes bindings for both v1 and v2 of lambda payloads.

Install

yarn add @tsnobip/reason-lambda

And add @tsnobip/reason-lambda to the bs-dependencies of bsconfig.json.

Usage

open ReasonLambda.V2;
type greetings = {greetings: string};
let handler: handler =
  (_event, _context) =>
    {greetings: "Hello world!"}->Response.fromBody->Js.Promise.resolve;

You can see a working example with the Serverless framework here.

Package Sidebar

Install

npm i @tsnobip/reason-lambda

Weekly Downloads

13

Version

0.2.0

License

MIT

Unpacked Size

7.53 kB

Total Files

12

Last publish

Collaborators

  • tsnobip