lambda-api icon indicating copy to clipboard operation
lambda-api copied to clipboard

Add support for CloudFront Lambda@Edge functions

Open tolidano opened this issue 6 years ago • 5 comments

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

tolidano avatar Aug 12 '18 04:08 tolidano

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

jeremydaly avatar Aug 12 '18 21:08 jeremydaly

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

jeremydaly avatar Nov 15 '18 21:11 jeremydaly

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?

jeremydaly avatar Nov 15 '18 21:11 jeremydaly

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 [email protected] 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.

tolidano avatar Nov 15 '18 22:11 tolidano

Some docs/notes on this:

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

jeremydaly avatar Jan 06 '19 17:01 jeremydaly