3 ms·
Have you considered just using lambda to http server adapter? That way you can just write a normal http server and test against that locally as normal, then whe
by richardanaya 6y ago
Have you considered just using lambda to http server adapter? That way you can just write a normal http server and test against that locally as normal, then when you publish to a lambda, the adapter turns AWS lambda json to http requests?
- tdfirth 6y agoI have considered it, yes, and there are a couple of projects that make the HTTP aspect of lambda easier, it's true. However running HTTP requests through lambdas is just one use case for them! For other kinds of events there doesn't really seem to be an equivalent. It would be great if there was a consistent way to do all of them.
- goodSyntax 6y agoI don't understand the benefit of that. Could you explain please? It sounds to me like doing what you describe would prevent all the wins of serverless - scaling and only paying for the runtime you use. In what you describe, you get zero auto-scaling unless you implement it yourself, and you pay more than just lambda or just a http server. It sounds like adding another layer of complexity on top for no benefit
- frompdx 6y agoI think the idea is to run a regular http server locally that forwards requests to your lambda handler function for the purpose of testing. When you actually deploy your lambda, you just hook up the lambda handler function and leave the http server out of the picture.