News for hackers. Stuff that matters.
Re:AWS services to avoid by helsinkiandrew on Sunday May 10, 2020 @07:12AM (#23131747)
> With the Lambda server-less paradigm, you end up with 1 lambda function per route

I’m not sure why this is the case. You could host all modules in the same lambda endpoint /api/v1/* Using the same technology you would use with any other backend

Re:AWS services to avoid by popotamonga on Sunday May 10, 2020 @07:40AM (#23131885)
I use Api gateway to redirect to a regular Flask lambda with all the endpoints
Re:AWS services to avoid by damagednoob on Sunday May 10, 2020 @07:27AM (#23131826)
Yeah, we use https://github.com/awslabs/aws-serverless-express/ which solves the problem of multiple routes and running an express app locally.
Re:AWS services to avoid by philliphaydon on Sunday May 10, 2020 @11:37PM (#23138677)
Yeah I use ASP.NET Core Lambda.

Article's comments don't seem well researched. Just used tech. Ran into road block. Blogged. Complained.

Re:AWS services to avoid by blntechie on Sunday May 10, 2020 @07:26AM (#23131822)
I was going to say the same. For smaller apps, just build a monolith as a function and proxy all routes to it from API Gateway. If microservices based app, each resource or route mapped to a function like what he mentioned is common though.
Re:AWS services to avoid by kdidbsbsbd on Sunday May 10, 2020 @12:11PM (#23133700)
You will end up needing to provisiom lambda size to the worst case of any one function. You need to split them if you want to use resources efficiently according to what the functions do.
Re:AWS services to avoid by helsinkiandrew on Monday May 11, 2020 @03:39AM (#23139761)
Agreed, this is the biggest issue with lambda for me - particularly Lambda Edge instances.

But I find it's the dependencies and common code that takes most of the space which often is common with all functions.

Re:AWS services to avoid by zegl on Sunday May 10, 2020 @08:28AM (#23132100)
Agreed, and even if do want to use a different lambda per route, it's not as troublesome to setup as the author claims.
Re:AWS services to avoid by dlhavema on Sunday May 10, 2020 @10:50AM (#23133039)
Yeah a swagger file broken up with multi-file-swagger npm module works great
Re:AWS services to avoid by coredog64 on Sunday May 10, 2020 @11:50AM (#23133539)
Thanks for the reference. I’ve been looking to solve a problem in this space and that’s perfect.
Re:AWS services to avoid by dlhavema on Sunday May 10, 2020 @10:36PM (#23138372)
This has been amazing for the ApiGateway swagger files. There is quite a bit of duplication and splitting it up let's us only write the common stuff one time.. error code handling, common request templates, etc...