4 ms·
> 7. AWS Lambda runs locally Although true, I have found it to be frustrating in practice compared to the simplicity of running a standard API locally. I have
by anegri 6y ago
> 7. AWS Lambda runs locally
Although true, I have found it to be frustrating in practice compared to the simplicity of running a standard API locally. I have even seen some people rig their lambdas to accept a boolean param which changes it to a standard server to get around this.
I think lambdas are great but the current tooling needs to advance a bit more for adoption to really take off imo
- babyyoda 6y agoYeah we had other hiccups around networking, but I’d say Azure Functions is only local debug experience I felt productive in
- k__ 6y agoAt least AWS SAM supports local debugging and testing.
- nickjj 6y ago> At least AWS SAM supports local debugging and testing. I'm still new to SAM but coming from a more regular style of web development it still feels brutally inefficient. Changing 1 line of code requires waiting multiple seconds to build + run your new lambda so you can see the changes even with a local invoke of it. That and if you really want to keep things local you need to mock out all calls to other AWS resources that you might be using in the lambda. Although you'd run into this same problem with a regular style app too. I'm so glad I don't have to do serverless development full time. Just so happens I'm doing a small service for contract work but yeah, it's like taking 100 steps backwards for development friendliness IMO.
- dhagz 6y agoI've tried using LocalStack for mocking AWS services locally, but it's never worked quite the way I want it to. At this point I just set up "local" versions of the resources I need in a non-prod account and set up the service to use those when I'm developing.
- nickjj 6y agoRight, I do that too. The real problem is the development lifecycle for a lambda. It's a constant loop of changing the code, building it and then invoking it. This process takes a bunch of seconds even for the smallest change in a tiny code base. It's much slower than writing code and immediately going to a browser to reload to see the changes which is something a lot of dev environments were able to pull off since about 1998.
- logical_proof 6y agoIf you edit the .aws-build folder directly you will get instant results without having to build. I am sure it is not a best practice.
- blahyawnblah 6y agoAnd serverless