问题
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:
- Possible additional cold start time caused by these extra dependencies
- Not being able to have separate granular permissions per route (e.g. one route accessing S3 and another accessing DynamoDB)
Advantages:
- Less boilerplate
- 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