jeremydaly / lambda-api

Lightweight web framework for your serverless applications
https://serverless-api.com
MIT License
1.42k stars 125 forks source link

Add support for CloudFront Lambda@Edge functions #58

Open tolidano opened 6 years ago

tolidano commented 6 years ago

There are request parsing differences with CloudFront as the event is structured differently: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html

jeremydaly commented 6 years ago

This is something I've been thinking about for awhile. Thanks for the ticket.

jeremydaly commented 5 years ago

Moved the additional API Gateway input support to a new issue #69.

jeremydaly commented 5 years ago

Besides Lambda@Edge having a different input, it also has a different output depending on how it is invoked. Will need to do some more research on this. Any example use cases?

tolidano commented 5 years ago

Because of the time it takes to deploy a CloudFront distribution and the version requirement, it usually makes sense to do a lot of testing via API Gateway first and once ready for the optimal runtime, push to the edge.

We repeatedly used this during testing some edge Lambdas.

On Nov 15, 2018, at 4:47 PM, Jeremy Daly notifications@github.com wrote:

Besides Lambda@Edge having a different input, it also has a different output depending on how it is invoked. Will need to do some more research on this. Any example use cases?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jeremydaly commented 5 years ago

Some docs/notes on this:

Lots to work through with this, so bumping to the next release.