TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A 7KB AWS lambda Node.js library with zero runtime dependencies

123 pointsby albertgaoover 5 years ago

6 comments

s_Hoggover 5 years ago
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?
评论 #22334820 未加载
评论 #22335831 未加载
评论 #22334569 未加载
评论 #22335415 未加载
评论 #22335168 未加载
评论 #22335102 未加载
评论 #22334725 未加载
评论 #22334511 未加载
评论 #22335688 未加载
评论 #22338772 未加载
评论 #22337302 未加载
评论 #22338990 未加载
评论 #22339196 未加载
rebolyteover 5 years ago
If you’re looking for more full-featured middleware functionality targeted at Lambda, also check out Middy:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;middyjs&#x2F;middy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;middyjs&#x2F;middy</a>
评论 #22339329 未加载
ilakshover 5 years ago
I&#x27;m sorry but why can&#x27;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.
评论 #22386866 未加载
616cover 5 years ago
It wasn&#x27;t obvious so I checked: zero runtime since it typescript and the @types&#x2F;aws-lambda stuff is not needed in resulting compiled JS. Still I&#x27;m not sure what this does beyond until functions for events you receive in Lambda and have to parse raw yourself?
评论 #22335627 未加载
fiboover 5 years ago
I created and use this tiny helper: <a href="http:&#x2F;&#x2F;g14n.info&#x2F;aws-lambda-res&#x2F;" rel="nofollow">http:&#x2F;&#x2F;g14n.info&#x2F;aws-lambda-res&#x2F;</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.
makstaksover 5 years ago
Thank you for this library, I am looking forward to reviewing your work. I didn&#x27;t want to use a framework (like hapi or express) to achieve something similar.