CGI was the OG serverless, because it was a process-per-request model until e.g. fastcgi came along.
Put scripts on an S3 backed filesystem, and as you grow, wrap them in a container, then an auto-scaling group. It might even work today!
I'm surprised I haven't seen more of this from the anti-Kubernetes crowd.