Not knowing this myself, could someone explain the attraction in using a web scripting framework for stuff like this? I get that this particular example makes the whole thing seem fairly straightforward, but have never really heard why people like adapting Node.js and similar to non-web environments beyond "you can". Is there anything more to it than that?
If you’re looking for more full-featured middleware functionality targeted at Lambda, also check out Middy:<p><a href="https://github.com/middyjs/middy" rel="nofollow">https://github.com/middyjs/middy</a>
I'm sorry but why can't you just call a few functions in your normal handler and then just return the normal type of object that Lambda wants?<p>This all seems to be pretty useless indirection to me.
It wasn't obvious so I checked: zero runtime since it typescript and the @types/aws-lambda stuff is not needed in resulting compiled JS. Still I'm not sure what this does beyond until functions for events you receive in Lambda and have to parse raw yourself?
I created and use this tiny helper: <a href="http://g14n.info/aws-lambda-res/" rel="nofollow">http://g14n.info/aws-lambda-res/</a><p>I think it is far enough for my needs, it is nice to use no framework other than the one provided by AWS.
Thank you for this library, I am looking forward to reviewing your work. I didn't want to use a framework (like hapi or express) to achieve something similar.