InsightsCloud
AWS Lambda Web Functions run your HTTP server on Lambda
On 12 October 2026 AWS launched Lambda Web Functions, which run a standard Node.js HTTP server with many concurrent requests per execution environment and bill on active CPU time. How the model works, what changes for scaling, access control and networking, and what to check before moving a service.
Published October 19, 20268 min read
On 12 October 2026 AWS announced Lambda Web Functions, a new kind of Lambda resource that runs an ordinary HTTP server instead of an event handler. Your code listens on a port, Lambda gives it an HTTPS endpoint, and each execution environment serves many requests at once. Billing is based on requests, active CPU time, memory held over the life of each environment and data transfer, rather than wall-clock time per request.
With the launch, existing Lambda functions have been renamed Lambda Event Functions. The announcement states this is a naming change only, with no code changes or redeployments needed.
At launch, Web Functions support Node.js only and are available in US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Tokyo) and Europe (Ireland). The AWS News Blog post specifies Node.js 24 (nodejs24.x) on Arm64.
What is different from an Event Function
The main change is in the programming and concurrency model. An Event Function handles one event per execution environment at a time. A Web Function environment behaves like a normal web server process.
| Event Functions | Web Functions | |
|---|---|---|
| Programming model | Handler receives an event | HTTP server listens on a port |
| Requests per environment | One at a time | Up to maxConcurrencyPerEnvironment (1–128, default 64) |
| Billing basis | Wall-clock duration | Active CPU time, plus memory for the environment's lifetime |
| Framework support | Through adapters | Express, Hono, Fastify and others directly |
| Languages | Many runtimes | Node.js only at launch |
| Typical use | Queues, streams, service events | Web apps, APIs, SSR, streaming responses |
For I/O-heavy services, the billing change matters most. A request waiting 200 ms on a database consumes little CPU while it waits, and other requests share the same environment during that time. The developer guide is explicit about the other side: memory keeps accruing while an environment exists, including idle time between requests.
The runtime contract
Lambda sets AWS_LAMBDA_HTTP_ENDPOINT to a host:port pair, and your server must start listening there within 10 seconds of the process starting. This is the example from the AWS announcement post:
import express from 'express';
const app = express();
const [host, port] = process.env.AWS_LAMBDA_HTTP_ENDPOINT.split(':');
app.get('/', (req, res) => {
res.json({ message: 'Hello from Lambda Web Functions!' });
});
app.listen(port, host, () => {
console.log(`Server running on port ${port}`);
});Locally it runs like any Node.js app, with AWS_LAMBDA_HTTP_ENDPOINT=127.0.0.1:3000 node index.js. Deployment is a .zip package, and the new aws lambda-web CLI namespace creates the function, a revision and an endpoint in one step:
# Single Region; creates an ApplicationManaged (public) endpoint by default
aws lambda-web deploy --name checkout-api --code ./checkout-api
# Require SigV4-signed requests instead
aws lambda-web deploy --name checkout-api --code ./checkout-api --auth-type IamAuthRunning deploy again uploads a new revision and points the endpoint at it. Creation is also available through the console, the SDKs, CloudFormation, SAM and the CDK.
Revisions and endpoints
A Web Function has two kinds of child resource, described in the core concepts page:
- Revisions are immutable snapshots of code and configuration. Changing the request timeout, environment variables or
maxConcurrencyPerEnvironmentmeans creating a new revision. Rolling back means routing traffic to an earlier one. - Endpoints each have their own domain with TLS, an authentication type, scaling settings and revision weights that split traffic across one or two revisions. An endpoint in
LatestRevisionauto-deployment mode follows the newest active revision; inDisabledmode you set the weights yourself, which is how a canary works:
aws lambda-web update-web-function-endpoint \
--function-name checkout-api \
--endpoint-name prod \
--auto-deployment-mode Disabled \
--revision-weights '[{"revisionId": "<current>", "weight": 90}, {"revisionId": "<new>", "weight": 10}]'Endpoints come in three types: HomeRegion, MultiRegion (one global domain with best-effort latency-based routing) and PerRegion (a Regional domain per Region, with routing left to you). The type and Region set are fixed at creation, so changing them means a new endpoint and a new domain for clients.
One detail to build into pipelines: an Active revision or a successful endpoint update does not mean your server started. Lambda does not check that the server listens when it shifts traffic. Send a test request after each deployment and read the logs before raising the weight.
Scaling and throttling
Scaling works on two axes, documented in scaling behavior: the number of environments, and concurrent requests per environment. Lambda manages a dynamic per-environment concurrency limit based on resource usage; maxConcurrencyPerEnvironment only caps it. Two optional endpoint settings bound the rest:
| Setting | Set on | Range | What it limits |
|---|---|---|---|
maxConcurrencyPerEnvironment | Revision | 1–128, default 64 | Upper bound on concurrent requests per environment |
maxEnvironments | Endpoint | 2–10,000, unset by default | Environments per Region |
rateLimit | Endpoint | 0–10,000 RPS, unset by default | Request arrival rate per Region |
Account quotas apply on top, per Region: 10,000 requests per second per endpoint, 100,000 across the account, and 2,000 vCPUs across all endpoints, with each environment using 2 vCPUs. That vCPU quota is shared, so one busy endpoint can stop another from scaling. Setting maxEnvironments on less important endpoints keeps them from consuming that shared pool.
When an endpoint cannot scale further and every environment is full, Lambda returns HTTP 429 immediately; it does not queue throttled requests. Requests do queue while a new environment is initializing. The lambda-web-error-type response header tells the cases apart, for example Platform.EndpointRequestThrottle. Clients need backoff with jitter, and the CloudWatch metrics EndpointRequestThrottles, EndpointActiveEnvironmentThrottles and AccountActiveVCPUArm64Throttles are the ones to alert on.
There is no minimum or reserved environment setting. Endpoints scale to zero and the first request after an idle period waits for a cold start. Lambda keeps headroom ahead of demand, but a sharp burst still waits on new environments. The dynamic concurrency limit also starts conservatively on a new function and adjusts as Lambda learns from traffic, so AWS advises running load tests more than once and using the later results.
Code that was safe on Event Functions may not be
An Event Function never handles two requests at once in the same process. A Web Function does, on a single Node.js event loop. The lifecycle documentation lists what that changes:
- Per-request state in module-level variables leaks between concurrent requests. Keep it in request scope or middleware context.
- Read-modify-write across an
awaitcan interleave with another request. Guard shared caches and counters. - CPU-heavy synchronous work blocks every request in that environment, not just one.
Shutdown is short. Lambda stops routing to an environment, lets in-flight requests finish on a best-effort basis, sends SIGTERM and allows up to 1 second for cleanup:
process.on('SIGTERM', () => {
// Flush buffered logs or metrics; anything longer will be cut off.
process.exit(0);
});The request timeout is the revision's timeoutSeconds: 3 to 900 seconds, default 30. A non-streaming request that exceeds it gets HTTP 504 with Runtime.RequestTimeout. A streaming response is cut off instead, so the client sees the 200 it already received and a truncated body.
Access control and the public domain
Each endpoint has an AuthType (see endpoint access control):
IamAuthrequires SigV4-signed requests (SigV4a forMultiRegion) and thelambda:InvokeWebFunctionEndpointpermission. Every signed request must include anX-Amz-Content-SHA256header.ApplicationManagedlets every request through. Authentication is your code's job, and the resource-based policy is not evaluated for invokes.
The CLI default is ApplicationManaged. Platform teams that want to control which endpoints are public can deny it in an SCP with the lambda:Request/WebFunctionAuthType condition key:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"lambda:CreateWebFunction",
"lambda:CreateWebFunctionEndpoint",
"lambda:UpdateWebFunctionEndpoint"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"lambda:Request/WebFunctionAuthType": "ApplicationManaged"
}
}
}
]
}Endpoints do not support custom domains or direct AWS WAF association. The documented pattern is CloudFront in front of an IamAuth endpoint, with origin access control (origin type lambda, signing behavior always-amz-auth) and a resource-based policy that allows only your distribution through an aws:SourceArn condition. CloudFront signs origin requests and can still pass the application's own Authorization header through. Do not forward the viewer Host header: Lambda routes on Host and returns 404 when it does not match the endpoint domain. The managed policy AllViewerExceptHostHeader handles this.
Networking and protocol limits
Outbound VPC access is configured per revision through an egress network connector, a separately versioned Lambda resource with its own operator role (networking guide). The constraints are worth knowing before you design around it:
- Connectors work only with
HomeRegionendpoints. A multi-Region Web Function cannot reach private VPC resources this way. - The connector gives VPC access, not internet access. Public destinations then need a NAT gateway route, as with any private subnet.
- There is no stable source IP, with or without a connector. Allow the connector's security groups or subnet CIDRs instead.
- Updating a connector publishes a new version, and existing revisions stay pinned to the old one until you create a revision that references the new version.
On the protocol side, endpoints accept HTTP/1.1 only and reject HTTP/1.0 with 505. WebSocket upgrades are not supported; server-sent events are the documented alternative for one-way streaming. Request line and headers are limited to 128 KiB, and Lambda adds no CORS headers. X-Forwarded-Host is forwarded unvalidated, so do not build redirects from it.
What to do now
Web Functions are a good fit for Node.js APIs and server-rendered apps that spend most of their time waiting on I/O and that currently run behind API Gateway or a function URL with an adapter. For a first trial:
- Pick one stateless Node.js service in a supported Region with no WebSocket or HTTP/2 origin requirement.
- Audit it for module-level request state and blocking work before deploying, then load test twice.
- Deploy with
--auth-type IamAuthbehind CloudFront with OAC, and add the SCP so public endpoints are a deliberate choice. - Set
maxEnvironmentsand alarms on the throttle metrics so one endpoint cannot exhaust the account's vCPU quota. - Use
Disabledauto-deployment mode with revision weights for production, with a smoke test before each weight change.
Services that need private inbound access, multi-Region VPC egress, WebSockets or a runtime other than Node.js should stay where they are for now. Event Functions are unchanged apart from the name, so nothing needs to move.