If you’re looking for more full-featured middleware functionality targeted at Lambda, also check out Middy: https://github.com/middyjs/middy
Someone HAS to start flagging these sorts of posts.
A 7KB AWS lambda Node.js library with zero runtime dependencies
61–63 of 63 posts
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#62If you’re looking for more full-featured middleware functionality targeted at Lambda, also check out Middy: https://github.com/middyjs/middy
Someone HAS to start flagging these sorts of posts.
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#63I'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? This all seems to be pretty useless indirection to me.
If you have one or two lambda functions, then definitely this may be overkill, like you said just call a few functions. But as your system matures and grows, these few functions become a few modules, then your few modules become libraries, so on and so forth. You might want to consider this pattern before it's unclear what exactly is interacting with your requests and responses and in what order.