3 ms·
Yes, you should. Especially if you want to scale up without tons of extra work. The model of "every function should be a separate Lambda" is just moronic - I'v
by theshrike79 3y ago
Yes, you should. Especially if you want to scale up without tons of extra work.
The model of "every function should be a separate Lambda" is just moronic - I've seen people run into hard limits on AWS going all-in on this model.
Instead Build a single executable/library and deploy it as a Lambda function.
Now you have automatic versioning, just push and it's a new version. You can label versions and call them based on labels.
Deploying to prod is just swapping the prod label to a new function. Want to roll back? Swap it back.
Credentials: ran a top10 mobile game backend on AWS Lambda with zero issues using a C# monolith.
- Aeolun 3y agoAWS limits are there to be worked around! Have too many lambdas to fit them in a single cloudformation stack? Just split it up into ‘per family’ stacks. Enjoy your nested cloudformation stacks. Oh, you say you have more than 200 endpoints in your REST API gateway, and suddenly your CloudFormation stop working? Yes, unfortunately CF only load 8 pages of resources in alphabetical order when starting, and your root resource starts with a ‘Y’. No problem, implement a new custom resource that just creates and discards API gateways until you have one with your desired root resource starting with ‘A-F’. Did I mention the ‘delete a rest api’ API is limited to a single call per minute? The fun doesn’t end. Now you may be able to grow until 600 resources before you’ll have to tighten the limits once again. You say you think this is bollocks? Of course, just switch to an Application Load Balancer. Just 100 rules max means you’ll only need to nest about 4 of them to fit all your API endpoints. And people wonder why some give up on the cloud. Any $5 VPS has higher limits than any of these AWS services…
- kikimora 3y agoWhy not 1 ALB in front of a Lambda with a router inside it?
- theshrike79 3y ago200 endpoints? Sheeesh. I've never seen anything over 50. That must've been a proper monolith then? =)
- Aeolun 3y agoWell, it doesn’t help that AWS counts every part of the path as a resource. If you start your url like /api/v1/service/endpoint, you immediately have 4 resources. But yeah, it’s a proper monolith.
- jamesfinlayson 3y agoLambda having a 6MB response limit is another great limit.