You can now run a standard Node. js web server on AWS Lambda with Lambda Web Functions, a new type of Lambda function. Deploy it with one command or AWS CloudFormation and get a public HTTPS endpoint with no adapter layer and no servers or load balancers to manage. Lambda Web Functions suit server-side rendered web apps, REST and GraphQL APIs, streaming endpoints, and microservices. Building on the launch announcement , this post uses a sample application to show how one execution environment handles many requests at once and how the same app serves a global audience.

See how active-CPU billing keeps the cost of waiting low while your code waits, with memory and requests billed separately. Lambda launched in 2014 with a minimal model: upload your code, and the service handles everything else. For over a decade that code ran as an event handler, invoked once per event such as a batch of queue messages or an object landing in Amazon Simple Storage Service (Amazon S3) . We now call this an Event Function and it remains the right choice for event-driven work. Web Functions are a second type of Lambda function, running on the same Firecracker -based isolation as Event Functions.

Instead of a handler that receives an event, your code runs as a standard HTTP server that listens on a port, which is what lets a web framework, or in this case a plain Node. js server, run unmodified. At launch, Web Functions run Node. js 24 on Arm64, with 2 vCPUs and 2 GB of memory per execution environment. Web Functions support Amazon Virtual Private Cloud (VPC) connectivity, allowing your function to access resources that exist within a VPC. js frameworks that start an HTTP server, such as Express, Fastify, and Hono, run without adapters. js in standalone mode needs a small index.

js that sets its host and port. This post uses a plain Node. js server to stay dependency-free. The full source is available in the Serverless Patterns collection along with other Web Functions patterns . You need an AWS account with the AWS Command Line Interface (AWS CLI) installed and configured and Node. The pattern instructions show how to clone the repo and change to the pattern directory or download the pattern . zip file to run the example. The dashboard is a single Node. js HTTP server that streams live server metrics to the browser over server-sent events (SSE).