asm
aws-serverless-micro
npm i aws-serverless-micro
asm

aws-serverless-micro

Deploy Micro functions on AWS Lambda

by Nathan Cahill

1.0.4 (see all)License:MITTypeScript:Not Found
npm i aws-serverless-micro
Readme

CI Coverage Status Dependencies

AWS Serverless Micro

Run Micro functions on AWS Lambda. A very thin layer for Micro functions that does two things:

Inspired by awslabs/aws-serverless-express.

With Micro:

// The Micro function
$ cat my-api.js
module.exports = async () => 'Welcome to Micro'

// Running with `micro`
$ micro my-api.js
micro: Accepting connections on port 3000

With aws-serverless-micro:

// The Micro function
$ cat my-api.js
module.exports = async () => 'Welcome to Micro'

// Wrapped in `aws-serverless-micro`
$ cat lambda.js
module.exports = {
    handler: require('aws-serverless-micro')(require('./my-api')),
}

// Deploy `lambda.handler` with the tool of your choice

Install

$ yarn add aws-serverless-micro
$ npm install aws-serverless-micro

aws-serverless-micro targets Node.js v8.10 or higher as this is the version running on AWS Lambda.

Compatability

This libary is 100% compatible with the Micro API. The full Micro test suite is run against the library with 100% coverage.

  • micro.send
  • micro.sendError
  • micro.createError
  • micro.buffer
  • micro.text
  • micro.json

License

MIT

Downloads/wk

27

GitHub Stars

12

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

2

OPEN ISSUES

0

OPEN PRs

5
VersionTagPublished
1.0.4
latest
3yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate