I'm late on this one. Two Lambda launches landed over the last few months that change how I'd answer "should this run on Lambda?": Lambda Web Functions, and GPU support for Lambda Managed Instances. Here's the short version of each.
Lambda Now Has Three Form Factors
AWS renamed what we've always called Lambda functions to Event Functions. Two other forms sit alongside it, all on Firecracker:
| Form factor | Programming model | Billing |
|---|---|---|
| Event Functions | Handler receives an event, one request per environment | Requests + wall-clock duration |
| Web Functions | Your HTTP server listens on a port, many requests per environment | Requests + active CPU time + memory |
| MicroVMs | Isolated stateful sandbox with its own lifecycle | Per instance-second |
Managed Instances (LMI) runs Event Functions on EC2 in your account, so I count it under the first row, not as a fourth form factor.
Web Functions: Your HTTP Server, Unchanged
With Web Functions you deploy a standard Express, Hono, or Fastify app. It reads AWS_LAMBDA_HTTP_ENDPOINT to find its host and port and listens like it would anywhere else. No handler, no adapter. aws lambda-web deploy returns an HTTPS URL, and a --regions flag replicates the app to multiple Regions behind latency-based routing. An endpoint can also be a CloudFront origin, with origin access control so only your distribution can call it.
Check the launch constraints before anything else:
- Node.js 24 on Arm64 only. No Python, Java, or .NET yet.
- Five Regions: us-east-1, us-east-2, us-west-2, ap-northeast-1, eu-west-1.
- Up to 2 vCPUs and 2 GB per environment, 512 MB unzipped package.
- Request timeout defaults to 30 seconds and tops out at 900.
- Concurrency defaults to 64 requests per environment (maximum 128).
- HTTP only. No SQS, S3, or EventBridge triggers. Those stay Event Functions.
Is it cheaper?
Not in general. Web Functions bill $0.30 per million requests (Event Functions: $0.20), $0.0000276944 per vCPU-second of active CPU, and $0.0000036667 per GB-second of memory for as long as an environment exists. Event Functions on Arm bill $0.0000133334 per GB-second of wall-clock time.
I ran the numbers using AWS's own Web Functions pricing examples (us-east-1, Arm, one always-on environment) against an Event Function doing the same work:
| Workload (per month) | Web Function | Event Function |
|---|---|---|
| Authorizer: 100M req, 50 ms, 12 ms CPU | $64.56 | $28.33 (128 MB) |
| SSR app: 15M req, 150 ms, 40 ms CPU | $25.78 | $18.00 (512 MB) |
| I/O-heavy API: 10M req, 200 ms, 50 ms CPU | $19.61 | $15.33 (512 MB) |
| LLM streaming: 5M req, 3 s, 200 ms CPU | $33.94 | $101.00 (512 MB) |
The Event Function figures are my math, not AWS's, and they assume the memory size you pick gives you the same duration. Real Web Function bills run higher than the examples if traffic is uneven and Lambda runs more than one environment.
Short requests favor Event Functions. Active-CPU billing only pays off when requests spend most of their time waiting. In the I/O-heavy API row, the Event Function stays cheaper until requests run a little over 250 ms, assuming 50 ms of CPU each. Past that, or for anything that streams, Web Functions come out ahead.
If you already have tuned Event Functions, leave them alone. Web Functions make sense for the app you already have: a working Express or Hono service moves over with a deploy command instead of a rewrite into handlers, and streaming responses bill on CPU time instead of wall-clock time.
GPU on Managed Instances
Event Functions on Lambda Managed Instances can now run on EC2 G-series GPU instances (G4dn, G5, G6, G6e and variants). You ship a container image, point the function at a capacity provider, and request GPU memory with AcceleratorMemorySize. Lambda ships base images for CUDA, PyTorch, CuPy, vLLM, and SGLang. With the vLLM image, serving an open model is a one-line Dockerfile plus a MODEL_ID environment variable.
It's aimed at inference, media processing, rendering, and scientific computing. AWS describes it as optimized for inference rather than training, and for custom models rather than the large foundation models Bedrock already serves.
The cost model
You pay the EC2 On-Demand price for the instance, a 9.75% management fee on top (15% on CPU instance types), and $0.20 per million requests. Savings Plans and Reserved Instances apply. There is no per-millisecond duration charge, so you pay for the instance whether the GPU is busy or not.
Three things keep the bill down:
- Concurrency. Up to 48 concurrent requests share one GPU per environment, and the vLLM image batches them against a single copy of the model. Utilization drives the bill.
- Scale to zero. You can set
MinExecutionEnvironmentsto 0, but AWS warns that scaling back up can take several minutes and requests can fail if GPU capacity isn't available. The general Managed Instances docs list a default minimum of three execution environments, so set this deliberately. - Quotas. New accounts can start with a G-instance quota of 0, so request an increase before you try it.
If your inference traffic is steady enough to keep a GPU busy, this removes a lot of cluster work. If it's sporadic, you'll either pay for idle GPUs or take multi-minute cold starts.
How I'd Choose
| Situation | Pick |
|---|---|
| Queue consumers, S3/EventBridge triggers, short handlers | Event Functions |
| Already-optimized Event Functions | Stay put |
| Existing Express/Hono/Fastify app (Node.js 24) | Web Functions |
| Long or streaming I/O-bound HTTP (LLM gateways, SSR) | Web Functions |
| Steady, high-volume traffic with Savings Plans | Event Functions on LMI |
| Custom-model inference with steady load | GPU on LMI |
| Foundation-model inference | Bedrock |
| Per-user sandboxes for untrusted code | MicroVMs |
Bottom Line
Web Functions make it easy to move an existing HTTP app onto Lambda, and they're a good fit for streaming. Don't expect them to be cheaper for short requests. GPU on Managed Instances gives you event triggers and no cluster to run, but you still pay for idle GPUs, so what matters is whether you can keep them busy. Check both against your real request durations and traffic before you move anything.