A New Hosting Option for HTTP Applications
Running an existing web application on AWS Lambda has traditionally required developers to adapt its request-handling model or introduce additional components. While these approaches work, they can add complexity when deploying applications built around conventional HTTP servers.
AWS Lambda Web Functions introduces a different approach. Applications built with frameworks such as Express, Fastify, and Next.js can run as HTTP servers directly on Lambda, with managed scaling and a billing model designed around active CPU usage.
For teams already hosting APIs or web applications, this raises an important question: does the new execution model offer enough technical and financial benefits to justify changing their existing infrastructure?
1. What AWS Lambda Web Functions Actually Changes
Traditional AWS Lambda functions, also called Event Functions, process requests through event handlers. Even when exposed through API Gateway or Lambda Function URLs, incoming HTTP requests are converted into events before reaching application code. Each standard execution environment generally processes one synchronous invocation at a time.
Running conventional web frameworks on Lambda was already possible through the AWS Lambda Web Adapter. This adapter translates Lambda invocation events into HTTP requests, allowing applications built with Express, Fastify, and similar frameworks to operate without rewriting their routing logic. The adapter also supports concurrent request processing when used with Lambda Managed Instances.
Lambda Web Functions introduces native HTTP-server execution without requiring that adapter. Applications listen on a network port and receive requests directly through AWS-managed HTTPS endpoints.
The differences extend beyond application packaging. Web Functions provide dynamic request concurrency within execution environments, separate active-CPU and memory billing, and a deployment model based on immutable revisions and traffic-routing endpoints.
These capabilities change how teams evaluate Lambda for HTTP workloads, particularly when considering resource utilization, operating costs, and deployment management.
2. How Request Handling, Concurrency, and Scaling Work
AWS Lambda Web Functions runs applications as conventional Node.js HTTP servers. At startup, the application listens on the host and port supplied through AWS_LAMBDA_HTTP_ENDPOINT. Lambda terminates HTTPS connections, forwards requests to the application server, and returns responses to clients.
Unlike traditional Event Functions, Web Functions can process multiple HTTP requests within one execution environment. For example, while one request waits for a database response, the Node.js event loop can process other requests. This benefits asynchronous, I/O-intensive applications, although synchronous CPU-heavy operations can delay requests sharing the environment.
AWS adjusts concurrency dynamically based on resource usage. The maxConcurrencyPerEnvironment setting defaults to 64 and supports values between 1 and 128. This represents the maximum permitted concurrency, not a guaranteed number of simultaneous requests.
Scaling also depends on the number of available execution environments. The optional maxEnvironments setting limits how many environments an endpoint can use, while rateLimit controls accepted requests per second. When request-rate or capacity limits are reached, Lambda can return HTTP 429 responses.
Web Functions automatically create additional environments as demand increases and scale to zero when traffic stops. Cold starts therefore remain possible when new environments must initialize.
For production applications, concurrency, request rate, and scaling capacity should be evaluated separately because each can affect throughput and response latency.
3. How the Billing Model Changes HTTP Workload Costs
AWS Lambda Web Functions introduces a different billing model that can affect the cost of hosting HTTP applications. Traditional Lambda Event Functions charge for requests and execution duration based on allocated memory. Web Functions instead charge separately for active CPU time, consumed memory, requests, and data transfer.
The key difference is how waiting time is treated. When an application waits for a database query or external API response, it consumes little CPU. Web Functions generally avoid CPU charges during this waiting period. However, memory remains billable throughout the execution environment's lifetime, including idle time between requests.
Consider an I/O-intensive API processing 10 million requests per month. Assume each request takes 200 milliseconds, including 50 milliseconds of active CPU processing. The application consumes approximately 300 MB of memory.
Using AWS's published US East (N. Virginia) Arm pricing, the estimated monthly charges are:
| Billing component | Monthly cost |
| Active CPU: 500,000 vCPU-seconds | $13.85 |
| Memory: 0.29 GB over 30 days | $2.76 |
| Requests: 10 million | $3.00 |
| Estimated total | $19.61 |
This example assumes one execution environment remains active throughout the month and serves all requests. It excludes free-tier allowances, data transfer, and supporting infrastructure costs. Actual expenses will differ as Lambda scales environments according to traffic.
The financial benefit is therefore workload-dependent. Applications that spend considerable time waiting for external services may benefit from active-CPU billing. CPU-intensive applications may see smaller advantages, while memory consumption and environment lifetime can offset potential savings.
Teams should compare measured CPU usage, memory consumption, traffic patterns, and total infrastructure costs before concluding that Web Functions is more economical than their existing hosting model.
4. Deploying and Managing Web Applications
AWS Lambda Web Functions uses a deployment model based on application packages, immutable revisions, and HTTPS endpoints. Developers package their Node.js applications as ZIP files, store them in versioned Amazon S3 buckets, and deploy them without converting HTTP routes into Lambda-specific handlers.
Each revision contains a snapshot of the application's code and configuration. Changes to the code, environment variables, request timeout, or concurrency settings require creating a new revision. This allows teams to preserve earlier versions for testing and rollback.
Endpoints control how incoming requests reach these revisions. Teams can distribute traffic between two active revisions using weighted routing, enabling canary deployments and gradual releases. Endpoint settings, including traffic weights, scaling limits, and authentication, can be updated without creating another revision.
AWS provides three endpoint types. HomeRegion serves requests from one Region, while MultiRegion routes requests across several Regions through a single global domain using latency-based routing. PerRegion provides separate regional domains, allowing teams to manage traffic distribution themselves.
However, multi-Region routing does not automatically provide health-based failover. Teams requiring regional disaster recovery must implement additional traffic-management and recovery mechanisms.
5. Production Limitations and Operational Considerations
AWS Lambda Web Functions simplifies HTTP application deployment, but its runtime, networking, and resource constraints can influence whether an application is suitable for production.
Web Functions currently support Node.js 24 on Arm64, with 2 GB of memory and two vCPUs per execution environment. Applications using other runtimes or native dependencies without Arm64 support may require changes. Frameworks such as Next.js may also need startup configuration to listen on the address provided through AWS_LAMBDA_HTTP_ENDPOINT.
Individual HTTP requests have a default timeout of 30 seconds, configurable up to 900 seconds. Web Functions support response streaming, including server-sent events, but not WebSocket upgrades. Their request handling is also half-duplex, meaning Lambda forwards the complete request body before delivering the application's response.
Security requires careful configuration. Every Web Function endpoint is publicly reachable, even when IAM authentication restricts access. Applications using application-managed authentication must enforce their own access controls. Custom domains and AWS WAF protection require an additional service such as Amazon CloudFront.
Networking restrictions also matter. Private VPC resources are accessible through egress network connectors, but these are supported only with HomeRegion endpoints. Applications using multi-Region endpoints must evaluate alternative approaches for accessing private dependencies.
Because concurrent requests share an execution environment, request-specific data should not be stored in global variables. Database connection pools need defined limits, while persistent application state should remain in external storage.
Production monitoring should track latency, errors, throttling, active environments, and downstream resource usage. Teams should also verify regional availability and account quotas before deployment, since these can limit the capacity available to an application.
6. When Should You Choose AWS Lambda Web Functions?
Choosing the right hosting model depends on application requirements, traffic patterns, resource consumption, and operational needs. AWS Lambda Web Functions introduces new capabilities, but these do not automatically make it a better choice than traditional Lambda or container-based services.
Web Functions are worth evaluating for Node.js APIs and web applications with variable traffic, particularly those that spend considerable time waiting for databases or external services. Concurrent request handling and active-CPU billing may improve resource efficiency, although actual savings depend on workload behavior.
Traditional Lambda Event Functions remain suitable for event-driven tasks, while container-based services offer greater flexibility for applications with different runtime or resource requirements.
The following decision matrix outlines where each hosting option may be appropriate.
| Application requirement | Hosting model to consider | Key consideration |
| Node.js APIs with variable traffic and significant I/O waiting | Lambda Web Functions | Concurrent HTTP requests, scale-to-zero, and active-CPU billing |
| Queue processing, scheduled jobs, or event-triggered workloads | Lambda Event Functions | Native event integrations and invocation-based execution |
| Existing Lambda web applications using a stable adapter integration | Lambda with Web Adapter | Migration may offer limited benefits without measurable improvements |
| Managed web hosting with automated source or container deployments | AWS App Runner | Simplified deployments, automatic scaling, and provisioned capacity |
| Applications requiring custom runtimes, larger resource allocations, or container control | Amazon ECS with Fargate | Greater flexibility over runtime, resources, and container configuration |
| Multi-Region HTTP applications requiring private VPC dependencies | Evaluate networking requirements first | Web Functions' multi-Region endpoints cannot use egress network connectors |
These recommendations are starting points rather than fixed rules. CPU-intensive applications are not necessarily unsuitable for Web Functions, just as I/O-heavy applications are not guaranteed to cost less.
Teams should evaluate expected concurrency, latency, resource requirements, infrastructure costs, and operational complexity before selecting a hosting model. The most suitable option is the one that meets these requirements with acceptable performance and cost.
7. What Should Teams Evaluate Before Migrating?
Before migrating an existing HTTP application to AWS Lambda Web Functions, teams should establish a baseline using their current hosting environment. This should include request volume, p95 and p99 response times, error rates, CPU and memory consumption, and monthly infrastructure costs.
Performance testing should use representative traffic patterns, including peak demand, sudden traffic increases, and idle periods. Teams should monitor cold starts, concurrent requests per environment, throttling, and database connection usage. Testing should also identify whether CPU contention or downstream service limits affect performance as concurrency increases.
Cost evaluation should account for active CPU time, memory consumption, requests, data transfer, and supporting services. Both hosting models should be tested under comparable traffic and application conditions to ensure meaningful results.
A limited production-like deployment can help validate these findings before migration. The decision should depend on measurable improvements in performance, cost, or operational efficiency rather than the availability of a newer execution model.
Choosing the Right Execution Model
AWS Lambda Web Functions introduces another option for hosting HTTP applications, with native web-server support, concurrent request processing, and a different billing model. These capabilities may benefit certain workloads, but they do not make traditional Lambda or container-based hosting obsolete.
The appropriate choice depends on application behavior, resource requirements, performance expectations, and operating costs. Evaluating these factors through realistic testing helps teams determine whether Web Functions is a practical improvement over their existing infrastructure.

