Unlike Lambda, CGI works on any web server and any OS. It's also extremely easy to mock because the input and output is stdin/stdout, not AWS API invocations that cost money every time you run.
What you miss out on is "scale to infinity" (read: your bill goes to infinity too).