4 ms·
Why would you do a multi-route API inside a Lambda? Doesn't that defeat the purpose of the Lambda itself?
by openbasic 8y ago
Why would you do a multi-route API inside a Lambda? Doesn't that defeat the purpose of the Lambda itself?
- ljm 8y agoThat (or the command pattern) is quite useful when you’re building chat bots and similar things. So it might make sense if the API has a small surface area. Not sure I would use it for a full blown backend though. That seems unwise.
- timdev2 8y agoIt's not an awful way to do things, provided your app can run comfortably in a lambda. You get dev ergonomics (run locally like a traditional app), and you avoid cold-starts for infrequently-invoked endpoints. You still get all the "serverless" benefits of FaaS, but don't need to architect absolutely everything around that paradigm. If in the future you want to move to running the thing on instances, you can do so pretty trivially.