🚀 Project Update:

Lambda API: v0.7 Released

Lambda v0.7 is here! New features include allowing middleware to accept an optional path argument that supports multiple paths, wildcards, and parameter matching to better control middleware execution. Plus additional parsing of the AWS Lambda context object for use in your applications. In an effort to ensure code quality and adequate test coverage, ESLint was added as well as coverage reports using Istanbul and Coveralls.

NPM: https://www.npmjs.com/package/lambda-api
GitHub: 
https://github.com/jeremydaly/lambda-api

Restricting middleware execution to certain path(s)

By default, middleware will execute on every path. If you only need it to execute for specific paths, pass the path (or array of paths) as the first parameter to the use function.

Path matching checks both the supplied path and the defined route. This means that parameterized paths can be matched by either the parameter (e.g. /users/:param1) or by an exact matching path (e.g. /users/123).

AWS Lambda Context Parsing

Lambda API now automatically parses the context object passed into the main handler function to give better access to this data within your middleware and routes. The REQUEST object now contains an id key that contains the awsRequestId as well as a context key that references the passed context directly. Access the clientContext, log_stream_name, identity and more using REQUEST.context. You can also call REQUEST.context.getRemainingTimeInMillis() to obtain the remaining execution time.

Test Coverage and ESLint

As we get closer to releasing a solid “version 1.0” of Lambda API, we want to ensure that regressions don’t creep into our code. We’ve added test coverage reporting with Istanbul and Coveralls as well as ESLint to ensure code quality.

Full Release Notes: https://github.com/jeremydaly/lambda-api/releases/tag/v0.7.0

NPM: https://www.npmjs.com/package/lambda-api
GitHub: 
https://github.com/jeremydaly/lambda-api


Did you like this post? 👍  Do you want more? 🙌  Follow me on Twitter or check out some of the projects I’m working on.

Learn more about Lambda API or check out the other projects I'm working on.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.