This response surprises me. I find Google Cloud Functions to be orders of magnitude worse than Lambdas. Everything that you deal with in AWS with the added bonus that instead of taking 5 seconds to deploy it takes 5 minutes. I would love to know better options. How do you deal with that horrible deployment time?
The simple answer is we don't. I've never even considered deployment time as a base metric, and I guess it's equally surprising to me that that's an issue. The fact that we can do all of our testing locally means that we rarely have to do the "log and redeploy" dance that the OP was referring to.
Right. I definitely try and do as much testing locally as I can, but it still often takes me 10-20 updates to get everything working (missed an environment variable, permissions different in the cloud, blah blah blah). That’s usually a couple hours of my life i don’t get back.
Yeah, completely understand. I think the only issue we've run into that's forced us to go back to the trough with multiple re-deploys is very early on when we were negotiating better CORS patterns.
Other than that, the fact that you can now fully simulate not only the GCF endpoints, but also all of RTDB and Firestore locally - and with a simple debug toggle to connect to stage/prod (insert safety disclaimer here) is a really powerful paradigm.
Certainly not something you couldn't do similarly with Lambda/Dynamo/API Gateway using IAM roles or whatever - but it just feels very first class citizen with GC.
Also, as an aside - I wouldn't normally try and convert someone from AWS => GC, because I think you can be equally effective in either. I only dropped my original response because the OP specifically called out local emulation being an issue.
1) If you're using Google Cloud Functions, you might also want to check out the Running Functions Locally doc page. [1] (There's an NPM library [2] - @google-cloud/functions-framework - that handles the scaffolding for you.)
Note that this library only supports scaffolding one function at a time per process - so you'd have to create a separate process [and use a separate port] for each function you're using. (This includes event-based functions - everything is HTTP under the hood, and this library is no different.)
2) Deployment time - you're definitely not the first to bring this up. :) We're working internally on improving deployment times.
I appreciate this comment. I spent 4 hours updating-deploy-test-repeat with GCP last night trying to track down a couple of niggling errors and it was a nightmare. I'd have killed to be able to step through it just once with a debugger and everything would have been fixed.