Background
Archive
Journal Entry

Cloudflare Workers vs AWS Lambda: Edge Computing Compared

Documented
Capacity
5 MIN READ
Domain
Website Performance & Ops

Cloudflare Workers and AWS Lambda both run application code on managed infrastructure. The useful comparison is the workload: required memory, runtime, data location, network access, and measured response time. A platform name alone does not establish which will be faster or cheaper.

Platform details checked on 15 September 2026. This comparison covers standard HTTP Workers and standard regional Lambda functions; specialised execution products have separate limits and prices.

Runtime and Limits

Standard Workers use V8 isolates. For paid HTTP Workers, the CPU allowance defaults to 30 seconds and can be configured up to 300 seconds. Memory is 128 MB. CPU time measures active computation; waiting for a network response does not consume it. The CPU limit is not a 30-second wall-clock timeout. See the Workers limits.

Lambda supports 128–10,240 MB of configured memory and a function timeout of up to 900 seconds. Its regional concurrency quotas also matter; new accounts can start with lower quotas than the documented default. Check your account before planning a burst of work. See Lambda quotas.

RequirementWhat to check
Small HTTP handlerTest both with the same external calls and payloads
More than 128 MB of memoryStandard Workers will not fit; evaluate Lambda or another runtime
Long processing jobCompare CPU requirements, elapsed time, trigger-specific limits, and retry behaviour
Existing librariesCheck runtime support and native dependencies before choosing
Traffic spikesCheck quotas, scaling behaviour, and downstream rate limits

These are platform limits, not throughput benchmarks. A workload that fits a limit can still perform poorly because of database queries or external services.

Performance: Measure the Whole Request

The original request path includes DNS, network travel, platform startup, application code, and downstream I/O. Running near the user does not remove the time spent calling a database in another region.

A useful comparison should record:

  1. The runtime, dependency size, memory setting, and deployment location.
  2. Warm and newly initialised executions separately.
  3. Median and 95th-percentile response time, including database calls.
  4. Errors, retries, and throughput during a representative traffic burst.

Do not budget around a generic claim such as “20 ms in Manchester”. A reproducible test needs a client location, network, payload, data location, and concurrency level. Use the same workload for both platforms.

Pricing Models

The paid Workers plan starts at $5 per month, with 10 million requests and 30 million CPU milliseconds included. Additional usage is $0.30 per million requests and $0.02 per million CPU milliseconds. Other Cloudflare services have their own charges. These are USD prices checked on the review date. See Workers pricing.

Standard Lambda pricing combines requests and compute duration. The request price is $0.20 per million, while duration pricing depends on configuration, architecture, region, and tier. Free-tier allowances and additional services affect the final bill. See Lambda pricing.

For example, 1 million Worker requests using 10 ms of CPU each consume 10 million CPU milliseconds. Those two usage figures fit inside the paid plan’s included allowances, so the Worker component is $5, assuming no other account usage. That example excludes storage, database, logging add-ons, and tax.

For Lambda, calculate billed duration multiplied by configured memory, then apply the relevant rate and allowances. Do not substitute Worker CPU time for Lambda elapsed execution time: they measure different things.

Use actual currency conversion and tax treatment in a UK budget. Unsupported GBP ranges conceal these assumptions.

Network Access and Data Location

Cloudflare now provides Workers VPC for reaching private services and networks. It is documented as beta on the review date. Saying Workers can only reach public services is incorrect. Check the supported network path, connectivity setup, and beta constraints against your infrastructure.

For an existing AWS application, evaluate how the function will use its databases, permissions, and private networking. For an existing Cloudflare application, evaluate bindings and the location of the data those bindings reach. Either choice still needs access controls and operational ownership.

Global execution is not a promise of UK-only processing. Cloudflare’s Regional Services is a separate localisation capability; eligibility, enabled products, logs, storage, and onward API calls need checking. Choosing an AWS region likewise does not establish where every connected service processes data.

Decision Guide

Shortlist Workers when you have an HTTP workload that fits its runtime and memory limits and can use the required Cloudflare services or network connections.

Shortlist Lambda when its supported runtimes, memory range, regional deployment, or integration with an existing AWS system match the job.

Using both can make sense when an edge handler validates and routes requests while a separate service processes longer jobs. That introduces another network and operational boundary, so justify it with requirements and measurements.

Before committing, test one complete business transaction, calculate its cost from measured usage, and verify the recovery path when a dependency fails.

Where Fernside Fits

We advise on this choice in advisory work, and we implement the runtime that the architecture actually needs. Workers next to Cloudflare-hosted sites, Lambda where AWS already holds the data, sometimes both. For AI backends that sit on either platform, that work folds into AI systems.

Want a platform recommendation against a real workload, not a vendor landing page? Book a discovery call and we will map latency, cost, and integration constraints before anyone writes a handler.

Further Reading

  1. Edge Computing Explained: Faster, Closer, Cheaper. what “run it near the user” actually changes
  2. Caching Strategies for Website Performance (2026 Guide). the layer that should sit in front of either runtime
  3. Hosting Matters: Why We Only Use Cloudflare Pages. why our sites sit on Cloudflare, and where that stops