Skip to content
run your http server in a aws lambda function
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
packages
.gitignore
.travis.yml tests Nov 8, 2018
LICENSE initial commit Jan 19, 2018
README.md travis badges Nov 8, 2018
greenkeeper.json
package.json tests Nov 8, 2018

README.md

aws-lambda-http-server

Call your http server stack code using an in memory http listener. No sockets needed.

js-standard-style build status downloads Greenkeeper badge

server.js

require('http').createServer((req, res) => {
  if (req.url === '/hello') return res.end('world')
})
.listen(5000)

aws-lambda.js

exports.proxy = require('aws-lambda-http-server')
require('./server.js')

serverless.yml

service: test
provider:
  name: aws
  runtime: nodejs8.10
  endpointType: edge
  region: eu-west-1
functions:
  proxy:
    handler: aws-lambda.proxy
    environment:
      PORT: 5000
    events:
      - http:
          path: /{proxy+}
          method: any
      - http:
          path: ''
          method: any

license

Apache License, Version 2.0

You can’t perform that action at this time.