hn.today

AWS Lambda Web Functions

aws.amazon.com13 points4 comments
Screenshot of AWS Lambda Web Functions

AWS Lambda Web Functions let developers run standard HTTP servers built with Express, Hono, Fastify, Next.js, or any Node.js framework on Lambda without rewriting code into event handlers. They provide an HTTP-native programming model with multi-concurrent execution (up to 128 concurrent requests per execution environment) and active CPU billing so CPU time is metered while idle I/O waits cost little; memory is billed for the environment lifetime. Lambda now exposes three form factors on the same Firecracker isolation technology: Event Functions (event-driven, single-concurrency, wall-clock billing), Web Functions (HTTP-native, multi-concurrency, active-CPU billing), and MicroVMs (isolated, stateful sandboxes for untrusted or user-generated code). These models are designed to be used together - Event Functions for asynchronous backends, Web Functions for user-facing APIs and server-side rendering, and MicroVMs for interactive code execution.

Deployment is simplified: a port-listening server reads AWS_LAMBDA_HTTP_ENDPOINT and can be deployed with a single CLI command (aws lambda-web deploy name my-web-app code ./my-app), which creates an immutable revision and an HTTPS endpoint. Web Functions supports multi-region replication with latency-based routing via a global .lambda-web.global.on.aws URL, weighted traffic shifting for canary rollouts (aws lambda-web update-web-function-endpoint … revision-weights), and integration with CloudFront as an origin including origin access control (OAC) for private origins. The model targets web apps, API backends, server-side rendering, and I/O-heavy workloads such as streaming AI inference, removing much of the multi-region, routing, and billing tuning complexity, and is available now.

Read on aws.amazon.com4 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Web

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.