aws-lambda-fastify icon indicating copy to clipboard operation
aws-lambda-fastify copied to clipboard

Support for Lambda@Edge

Open rdsedmundo opened this issue 3 years ago • 3 comments

🚀 Feature Proposal

Add support for Lambda@Edge payload, serverless-express supports it.

This is pretty much just understanding its input/output, I believe no major changes would be required as it's somewhat similar to the regular integration.

Motivation

To have a unified interface between API Gateway and Lambda@Edge.

Example

Same as above.

rdsedmundo avatar Jul 05 '21 10:07 rdsedmundo

I don't think it's a good idea to have a fastify server at lambda@edge, but feel free to contribute with a PR, if needed.

adrai avatar Jul 05 '21 12:07 adrai

It looks overkill at first sight, but you can build something really complex in Lambda@Edge, like https://github.com/serverless-nextjs/serverless-next.js (not saying that I'd use fastify for serverless-next.js, just an example).

Otherwise, you have to build the content parsing, routes with parameters, etc, etc, all on your own.

rdsedmundo avatar Jul 05 '21 13:07 rdsedmundo

I'm personally not going to use fastify on lambda@edge, so feel free to try a PR with tests...

adrai avatar Jul 05 '21 13:07 adrai