1.0.12 • Published 9 years ago

aws-lambda-http v1.0.12

Weekly downloads
3
License
MIT
Repository
github
Last release
9 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

9 years ago

1.0.11

9 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago