fastify / aws-lambda-fastify

Insipired by aws-serverless-express to work with Fastify with inject functionality.
MIT License
512 stars 32 forks source link

Do you suggest this wrapper over serverless-http? #158

Closed steffenstolze closed 1 year ago

steffenstolze commented 1 year ago

Prerequisites

Issue

Hey folks,

thanks for maintaining Fastify and all it's packages! Awesome work!

I've realised that we're often using https://github.com/dougmoscrop/serverless-http when running Fastify inside a Lambda function.

I was wondering, are there any downsides to this approach? Do you suggest this package, since it's in the same fastify namespace?

Thank you!

adrai commented 1 year ago

serverless-http seems to be slower ;-) https://github.com/fastify/aws-lambda-fastify#%EF%B8%8Fsome-basic-performance-metrics

steffenstolze commented 1 year ago

@adrai sure, but at the same time you can see this in the readme:

image

I don't quite get that tbh.. If I'm using another web framework (e.g. Fastify) I should have a look at: serverless-http and not the aws-lambda-fastify package for this web framework?

adrai commented 1 year ago

just rephrased that sentence

steffenstolze commented 1 year ago

This makes absolute sense now, thx!

So, you'd recommend aws-lambda-fastify then, I guess. Which would be rational, since it's the same namespace like the main web framework.

No known limitations for Fastify compared to serverless-http? Sorry for stressing that point, I don't want to discover this down the road :)

thank you!

adrai commented 1 year ago

Yes, I personally recommend aws-lambda-fastify. No known limitations so far.

steffenstolze commented 1 year ago

Thank you!