AWS Lambda Web Adapter
Cost model and performance pitfalls
- Lambda bills for duration, so blocking on slow or hung downstream APIs can explode costs compared to always‑on servers.
- Timeouts are essential to cap cost, but aggressive timeouts plus retries can backfire and increase total work and spend.
- Cloudflare Workers are contrasted as billing on CPU time, not wall time, making network waits cheaper there.
- Thread notes Lambda’s default (3s) and practical limits on timeouts; some argue you want short timeouts to avoid “blank checks” to AWS.
When Lambda fits vs. when it doesn’t
- Good fit: low‑TPS internal apps, spiky or infrequent workloads, job/queue processing, webhooks, “fire sale” / telemetry‑like bursts, and pet projects where scaling to zero matters.
- Poor fit: consistently high load, long‑running or IO‑heavy calls, high DB connection counts, or where development iteration speed and observability are critical.
- Several commenters say ECS/Fargate or traditional containers solve many problems more cleanly once you have steady traffic.
Lambda Web Adapter and reuse of containers
- Adapter enables running the same HTTP container on Lambda, ECS/Fargate, or EC2, reducing duplicate codebases and easing lift‑and‑shift from one compute option to another.
- Some see this as improving security/compliance by reusing a single well‑known container; others worry it encourages keeping legacy systems alive instead of fixing underlying issues.
- One pattern: deploy the same image as both Lambda and Fargate service behind an ALB, then direct traffic to whichever is more cost‑effective for that workload.
Architecture patterns: async, APIs, and pooling
- Async/claim‑check patterns, webhooks, Step Functions, and queues (e.g., SQS) are suggested to avoid Lambdas waiting on long operations.
- Direct Lambda‑to‑Lambda blocking calls are viewed as an antipattern; event/queue‑based designs are preferred for cost and resilience.
- Connection pooling works per‑Lambda instance lifetime; for databases like Postgres, unbounded concurrency leads to too many connections without a proxy (e.g., RDS Proxy).
Developer experience and “programming the machine”
- Opinions diverge on iteration speed: some find Lambda cycles acceptable, others find build/deploy/debug painfully slow compared to local dev + containers/Kubernetes.
- Many note significant time spent on IaC and wiring AWS services (“programming the machine”) that can rival or exceed application coding.
- Scaling to zero is valued for per‑branch ephemeral environments and previews, but some argue the complexity often outweighs small cost savings.