1.0.12 • Published 7 years ago

aws-lambda-http v1.0.12

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

aws-lambda-http

Web framework for AWS Lambda.

Usage (lambda)

index.js (lambda)

var app = require('aws-lambda-http');

//middleware (e.g Authorization header validation /resource access)

app.use(function(req,resp,next){

    if (!req.hearders.Authorization){
        resp.send("Unauthorised access",401);
        return;
    }
    next();
});

app.get('/greeting', function (req, res) {
  res.send('Hello World');
});

// This is the handler that's invoked by Lambda
exports.handler = app.handler;

Installation

$ npm install aws-lambda-http

NOTE:

check the option 'Use Lambda Proxy integration' when you integrate with AWS API Gateway

sample project

https://github.com/aranga-au/lambda-helloworld

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago