Introduction
Micro Lambda API is a small library for AWS Lambda that provides an easy way to use routing with AWS API Gateway and AWS Application Load Balancer services for API.
That library has taken reference to some libraries such as:
Lambda API (https://github.com/jeremydaly/lambda-api)
Koa Router (https://github.com/ZijianHe/koa-router/)
AWS Lambda Router (https://github.com/art-dc/aws-lambda-router)
About the library
This library aims to abstract the logic to perform REQUESTs and RESPONSEs in a simple and easy way that allows you to focus on the development of your lambda functionality. It has a LOGGER implementation using JSON to have a better traceability and control of events when it is sent to CloudWatch or another log monitoring platform.
Features
Integration with Gateway Lambda Proxy Integrator API using REST API or HTTP API.
Integration with ALB Lambda Target Support.
Enabling CORS for requests.
No external dependencies.
You can use the separate
Request
,Response
andLogger
The final middleware router runs after all routes and middleware have completed.
Creation of multiple routers with different versions.
Enable logger using
process.stdout
andprocess.stderr
.Typescript support.
Last updated
Was this helpful?