Native Serverless vs Serverless Express

会有一股神秘感。 提交于 2019-12-11 06:07:50

问题


Right now, I am following a guide prepared from Serverless Stack Team. They are using React and lots of AWS features like lambda and API getaway. In order to practice it, I am re-writing one of my old Express example with the Serverless stack.

I also saw a library or tool called aws-serverless-express. This library or tool allows you to run your express app in a way that serverless form.

It will be a weird question, but I was wondering the difference between native serverless build and serverless express.

Cold start already disadvantages. I am aware of it. Other than this, what will be the negative or positive sides of serverless express?
what will be the negative or positive sides of native serverless?


回答1:


Disadvantages of serverless express:

  1. Possible additional cold start time caused by these extra dependencies
  2. Not being able to have separate granular permissions per route (e.g. one route accessing S3 and another accessing DynamoDB)

Advantages:

  1. Less boilerplate
  2. Avoiding resources limits in CloudFormation stacks

More information:

https://github.com/jeremydaly/lambda-api#why-another-web-framework

https://www.jeremydaly.com/build-serverless-api-serverless-aws-lambda-lambda-api/#comment-19036



来源:https://stackoverflow.com/questions/57450146/native-serverless-vs-serverless-express

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!