Re:Anti-Patterns to Avoid in Lambda Based Apps
by k__ on Friday November 05, 2021 @08:16AM
(#29118133)
I'm currently using tools like CDK and Pulumi, which allow to abstract multiple resources neatly into one component.
Do you think monolitic Lambdas still make sense in that case?
Re:Anti-Patterns to Avoid in Lambda Based Apps
by qvrjuec on Friday November 05, 2021 @11:18AM
(#29120486)
CDK(and infra as code in general) is amazing, especially for use cases like this where one would be responsible for deploying and creating resources around 10s of lambdas for one 'service'.
Re:Anti-Patterns to Avoid in Lambda Based Apps
by giorgioz on Friday November 05, 2021 @10:58AM
(#29120194)
We are using AWS CDK too! CDK is freaking AWESOME to write Infrastructure as Code.
AWS CDK
https://anjith-p.medium.com/writing-infrastructure-as-code-w...
Yes in my opinion the right division is
GOOD 1 lambda = 1 service
BAD 1 lambda = 1 endpoint
I'm eager to chat with you about CDK since it's kind of new and I don't know anyone else using it. Feel free to write me at giorgio DOT zamparelli AT gmail DOT com to chat about CDK, Lambda, serverless, Infrastructure as Code.
Re:Anti-Patterns to Avoid in Lambda Based Apps
by jayair on Friday November 05, 2021 @12:54PM
(#29121861)
If you are using CDK then check out SST: https://github.com/serverless-stack/serverless-stack
It's based on CDK and has a great local development environment for Lambda. It allows you to set breakpoints and test it locally: https://serverless-stack.com/examples/how-to-debug-lambda-fu...
Re:Anti-Patterns to Avoid in Lambda Based Apps
by andrew_ on Friday November 05, 2021 @12:18PM
(#29121373)
You might want to edit that comment and speak towards cold start times, dependency management, your deployment strategy (e.g. are you using a docker image lambda or zip, etc) and what you're paying for provisioned concurrency to keep those big lambdas warm and available. That's all nuance you're missing from promoting monolith lambdas, and those kinds of things will get the non-architect-minded in hot water.
Re:Anti-Patterns to Avoid in Lambda Based Apps
by giorgioz on Thursday November 11, 2021 @02:53AM
(#29185522)
We use node.js and the cold start times are negligible.
Java, C# and docker based lambdas have problems with cold start times but we do not suffer from them.
We also use JAMstack and our html pages are statically generated in advance with Cloudfront CDN in front.
We use Lambda for the backend REST JSON APIs.
I believe the reason why Lambda has seen so little adoption is because cloud architects suggest to break existing services into a Lambda function for each endpoint. This causes an explosion of complexity and code that runs in the cloud in one way but it can't be reproduced locally on developer machine easily.
My advice is the opposite: DO USE MONOLOTHIC LAMBDAS.