by botto · 7y ago · 0 comments
> I only had to add a simple config file, add one dependency and one small startup class to my existing API project.
This is not the way to do it, you have to spend some time on lambda approach.
Usually splitting up your code in to smaller chuncks so you don't end up with long spool up times and you can do things like keeping your lambda warm and caching high impact parts of the code. (sometimes of course you can't cache, I know)
Having gone through this process myself with a very very large code base, it would have not worked to just slap it into serverless.
Going server less can save you money, but not by just taking your existing app and throwing it on Lambda.
More like "seems like there's an easy way for me to try this new thing out, lets give it a shot". It took a couple of hours to switch over to this, and I learnt something in the process. Also, our API is very simple, pretty much all the actions are a single database call, so I don't think in this case we would have gained anything by splitting things up into more pieces. But I can see how it would make sense for a larger, more complicated app.
A source which supports that. [1]
[1]: https://medium.com/thundra/the-fundamental-problem-solving-n...