Socket
Socket
Sign inDemoInstall

@vendia/serverless-express

Package Overview
Dependencies
6
Maintainers
4
Versions
57
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vendia/serverless-express

This library enables you to utilize AWS Lambda and Amazon API Gateway to respond to web and API requests using your existing Node.js application framework.


Version published
Maintainers
4
Created

Readme

Source

AWS Serverless Express is moving

On 11/30, the AWS Serverless Express library is moving to Vendia and will be rebranded to @vendia/serverless-express. Similarly, the aws-serverless-express NPM package will be deprecated in favor of @vendia/serverless-express.

Brett, the original creator of the Serverless Express library, will continue maintaining the repository and give it the attention and care it deserves. At the same time, we will be looking for additional contributors to participate in the development and stewardship of the Serverless Express library. AWS and the SAM team will remain involved in an administrative role alongside Vendia, Brett, and the new maintainers that will join the project.

We believe this is the best course of action to ensure that customers using this library get the best possible support in the future. To learn more about this move or become a maintainer of the new Serverless Express library, reach out to us through a GitHub issue on this repository.

Best, The AWS Serverless team, Brett & the Vendia team


Serverless Express

npm npm dependencies Status Contributor Covenant

Run serverless applications and REST APIs using your existing Node.js application framework, on top of AWS Lambda and Amazon API Gateway. The sample provided allows you to easily build serverless web applications/services and RESTful APIs using the Express framework.

Getting Started

npm install @vendia/serverless-express
// lambda.js
'use strict'
const serverlessExpress = require('@vendia/serverless-express')
const app = require('./app')
const server = serverlessExpress.createServer(app)

exports.handler = (event, context) => { serverlessExpress.proxy(server, event, context) }

Package and create your Lambda function, then configure a simple proxy API using Amazon API Gateway and integrate it with your Lambda function.

Quick Start/Example

Want to get up and running quickly? Check out our basic starter example which includes:

Getting the API Gateway event object

This package includes middleware to easily get the event object Lambda receives from API Gateway

const serverlessExpressMiddleware = require('@vendia/serverless-express/middleware')
app.use(serverlessExpressMiddleware.eventContext())
app.get('/', (req, res) => {
  res.json(req.apiGateway.event)
})

Is AWS serverless right for my app?

Benefits
Considerations
  • For apps that may not see traffic for several minutes at a time, you could see cold starts
  • Cannot use native libraries (aka Addons) unless you package your app on an EC2 machine running Amazon Linux
  • Stateless only
  • API Gateway has a timeout of 29 seconds, and Lambda has a maximum execution time of 15 minutes.

Keywords

FAQs

Last updated on 14 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc