express-aws-lambda
v0.1.1
Published
Express.js extension for AWS Lambda and ALB
Downloads
4
Readme
express-aws-lambda
This library is a express.js extension for AWS Lambda and ALB. You can run your web application for the express.js on AWS Lambda.
This is simillar to aws-serverless-express. But this implementation don't use a socket.
Getting Started
npm install express-aws-lambda
'use strict';
const express = require('express');
const app = express();
app.use(express.json());
app.use(function (req, res) {
// You can access to lambda arguments
console.log(req.source.event);
console.log(req.source.context);
res.json({
message: "Hello world!"
});
});
exports.handler = require('express-aws-lambda')(app);
You have to use a API Gateway or a Application Load Balancer with your lambda application when you want to use this module.