> Perhaps it could be a good fit for serverless functions.
I was thinking of that too. :)
If you're interested in the technical mechanism, it's possible to load a core dump and resume execution. I found https://web.archive.org/web/20091026234235/http://geocities.... which explains the (surprisingly complex) process of resuming from a core dump.
Also see https://criu.org/ and https://checkpointing.org/