83 points · by seanw265 · 3w ago · 31 comments
It's not documented but if you make one request with event functions, the Lambda runtime lives for about 7 minutes before it's reaped. I assume this is why the Web Function bills you for about 7 minutes of memory, it needs to hold that memory while it's running in case another request comes in. If you have a lot of rarely invoked functions, it is cheaper to use Lambda Event Functions. There you'll pay for GB/s for the duration of your function.
For Event Functions with node, your best possible E2E coldstart time with an AWS service call is sub 500 ms https://speedrun.nobackspacecrew.com/blog/2025/07/21/the-fas... I have not benchmarked web functions yet, but if they are running on the same infrastructure, I would assume the lower limit is similar.
You raise a good point about the hardware generations. I would like to do a larger sample, though I'm not so concerned about benchmarking each cpu separately since deployers can't control the hardware their functions run on.
IMO your thought about the idle lifetime is plausible. But the distinction between how Event and Web functions handle idle time (outside of billing) is that Event functions are frozen after the invocation completes. No code can execute while frozen. Whereas Web functions stay alive during that entire period. They can do anything they want after the invocation completes and before they are shut down.
I confirmed this by logging heartbeats during the idle period.
Thanks for your thoughtful comment.
Yes, if you run at least 100 coldstarts and ignore the hardware, you'll get a good real world representation. I usually execute the function every 8 minutes for a day so I get a good sample size. If you're curious to see the difference that hardware makes on coldstart times, I have a recent writeup here: https://speedrun.nobackspacecrew.com/blog/2026/10/15/shrinki...
> But the distinction between how Event and Web functions handle idle time (outside of billing) is that Event functions are frozen after the invocation completes. No code can execute while frozen. Whereas Web functions stay alive during that entire period. They can do anything they want after the invocation completes and before they are shut down.
Yes this is correct. I got the impression you weren't trying to do any extra work after the request which is why I was suggesting that event functions would be cheaper for use cases that are mostly coldstarts.
You can configure teardown and minimum workers, and with a busy site, most of the time requests aren’t going to stop enough for this to matter.
Also: afaict idle time before teardown is not configurable.
And you can exit Web Functions early, but AWS records it as a failure and I can’t say what would happen to requests in flight but haven’t reached your function yet. It’s not something I was comfortable relying on.
https://www.easel.sh runs on it.
I take it, then, that you've successfully accomplished this yourself in production?
https://docs.dbos.dev/conductor/reference/dbos-cloud/deployi...
GCP is also not the easiest to onboard with, which is how Google appears to roll in general.
On the technical side, AWS Lambda is more feature rich, mature, offers extensive configuration controls and really excels at granular, event source type agnostic, event-driven execution and its integration with the wider AWS ecosystem.
Cloud Run functions are more skewed towards HTTP based workloads, although, since it integrates with Eventarc, at least some feature parity with AWS Lambda should be expected. Cloud Run services are closer to AWS Fargate rather than the Lambda, but not everyone has (or wants) a container to run.
The extensive amount of publicly available knowledge on AWS Lambda should not be discounted, either. Google Cloud Run functions and services are just not as widely known and discussed.
If you do everything agnostic, it is hardly any cheaper than running everything on prem, as per the amount of infrastructure people required.
I don’t mean to imply that Lambda Web Functions are a bad fit for every workload, just that they are a bad fit for our workload as a result of this behavior.
Edit: I made an update to the post to hopefully clarify this.
When you perform six requests simultaneously, lambda will start six concurrent instances to process your requests as quickly as possible and then let them be idle for seven minutes.
This makes lambda more expensive than just having a single server that runs all the time.
I measured between 5 and 7 minutes of idle time (after the last request had ended) across six environments. I was able to cut this short by exiting the process myself, but AWS records this as a runtime error so IMO it's not suitable to rely on in production.
Here's the AWS scaling documentation. I'm happy to be corrected if I missed anything.
https://docs.aws.amazon.com/lambda/latest/dg/web-functions-s...
This is marketing for a Lambda competitor.
And for context, Easel.sh is an alternative to Vercel, not AWS. Easel actually uses traditional Lambda as part of its core infrastructure. I was hoping Web Functions could replace some of the custom infrastructure we'd built on top of it, but the idle-memory billing made it a poor fit for our workload.
I thought the findings were worth sharing.