Lambda Web Functions by AWS
One normal web app instead of dozens of functions, with a shared database pool. The catch is that it isn't in Sydney.
The pain: Your API is a swarm of tiny Lambdas. Every concurrent request opens its own Postgres connection, so a traffic spike runs the database out of connections and you end up bolting on RDS Proxy.
The fix: One ordinary Node.js web server (Express, Hono) serves up to 64 to 128 requests at once from a single environment, sharing one connection pool. You pay for active CPU, not for time spent waiting.
What it is
AWS renamed every Lambda you have to "Event Functions" and added a second kind: Web Functions. A Web Function runs an ordinary Node.js web server (node server.js, Express, Hono). One environment handles up to 128 requests at the same time (64 by default), instead of one request per Lambda instance. You're billed for requests, active vCPU time and the memory the environment holds, so time spent waiting on Postgres or an LLM barely costs anything. CloudFront can now use a Web Function as an origin, which gives you edge TLS, caching, a custom domain and WAF. Origin access control locks it so only your distribution can call it.
Before and after
- Before: a function per route, each behind a function URL. A spike of 1,000 requests means up to 1,000 Lambda instances, each with its own database connection, and Postgres runs out.
- After: one Hono or Express app per domain, behind CloudFront. Each environment shares one
pgpool, so connections follow environments, not requests. RDS Proxy may become unnecessary.
The catch for Australian clients
Sydney isn't one of the five launch Regions (us-east-1, us-east-2, us-west-2, Tokyo, Ireland), so a Sydney database means every query crosses an ocean. There's a lead: Aidan Steele ran a multi-Region endpoint with a replica in ap-southeast-2 and reports that requests from Melbourne executed in Sydney. AWS's docs neither confirm nor deny that Sydney can be a replica, and the home Region (control plane, logs) must still be a launch Region. There's a second catch, and this one AWS does document: multi-Region endpoints can't use a VPC connector ("egress network connectors only with HomeRegion endpoints"). So a Sydney replica can reach Neon or any database with a public endpoint, but not an Aurora or RDS cluster inside your VPC. Test it yourself before you promise it to a client.
Gotchas, with fixes
- Up to 128 requests share one process, so a module-level "current user" variable leaks between users. Keep request data on the request (or in AsyncLocalStorage), and audit globals before you merge functions.
- Your server must listen within 10 seconds on the port Lambda gives it, or requests fail even though the deploy shows Active. Smoke-test after every deploy.
- Over the limits you get HTTP 429, not a queue. Retry with backoff, and set
rateLimitto protect the database. - Infrastructure as code: Pulumi works only through
@pulumi/aws-native(v1.82+), and the Terraform AWS provider doesn't support it yet (issue 50429).
Cost
The us-east-1 rates are $0.30 per million requests, $0.0000276944 per vCPU-second and $0.0000036667 per GB-second. AWS's example of 15 million requests a month comes to $25.78. For a typical API it costs about the same as classic Lambda. The reason to move isn't price: it's the connection pool and a simpler app.
My verdict
Still watching, as in the stack. It's the right direction for Postgres-backed APIs, but it's a week old, has no home Region in Sydney and no Terraform support. Pilot it now only for workloads whose users and data sit in a launch Region.