Skip to main content
Comparison

AWS Lambda Functions vs Cloudflare Workers

Compare categories, runtimes, pricing, regions, infrastructure, and platform trade-offs.

Comparison space

Updated

Which should you choose?

Choose AWS Lambda when your work is driven by AWS events, needs close integration with AWS services and IAM, or requires a regional function execution model with managed concurrency controls. Choose Cloudflare Workers when your application is primarily handling HTTP requests, routing, middleware, or API logic distributed across Cloudflare’s edge network.

This is not simply a choice between two ways to host the same JavaScript function. Lambda and Workers differ in the events that invoke them, the code they run, how they scale, and what execution time means for both operations and billing.

Event integration versus request-path execution

Lambda is a natural fit for S3 events, queues, data streams, and other AWS-managed event flows. AWS provisions function execution environments as demand changes, and regional account concurrency is a planning constraint. It provides reserved concurrency to protect or bound functions and provisioned concurrency to reduce initialization delays, with additional cost for provisioned capacity. AWS Lambda concurrency

Workers is useful for responding to traffic at the edge and for building APIs, middleware, and application logic in the Cloudflare environment. It also supports scheduled and queue-triggered work, so edge does not mean HTTP-only. But Workers should not be treated as a drop-in replacement for every AWS event-source integration. Cloudflare Workers documentation

Runtime and dependency boundaries

Lambda provides managed language runtimes and also supports deployment from container images. Its execution environments are regional and can be reused between invocations, with initialization latency when a new environment starts. Workers uses an isolate-oriented runtime, with its own memory, compatibility, and CPU-time constraints. A dependency requiring a conventional server process, a native binary, or a specific runtime API needs explicit compatibility testing rather than a generic platform checkmark. AWS Lambda execution environments · Cloudflare Workers limits

Understand the billing units

Standard Lambda on-demand usage is billed by requests and execution duration at the allocated memory size, subject to free allowances and regional rates. Provisioned concurrency and supporting AWS services can add charges. Workers Paid bills requests and CPU time, with included usage and an account minimum; time waiting for external I/O is not billed like active CPU time. A simple comparison of requests per month will not determine which is cheaper. Workload shape, memory, CPU use, execution time, and dependencies all matter. AWS Lambda pricing · Cloudflare Workers pricing

Decision boundary: Choose Lambda when AWS event integration and regional execution are the center of the architecture. Choose Workers when distributed HTTP handling and the Cloudflare runtime are the center. For an edge API that must repeatedly access a single AWS-region database, model the network path before expecting a latency improvement from moving execution to the edge.

Comparison facts

Platform

Delivery
Managed
Supported
Managed
Supported
Services
Edge Functions
Not supported
Edge Functions
Supported
Functions
Supported
Functions
Not supported
Key-Value Store
Not supported
Key-Value Store
Supported
Managed Databases
Not supported
Managed Databases
Supported
Object Storage
Not supported
Object Storage
Supported
Queues
Not supported
Queues
Supported
Workflows
Not supported
Workflows
Supported
Workloads
AI Inference
Not supported
AI Inference
Supported
APIs
Supported
APIs
Supported
Backend Services
Not supported
Backend Services
Supported
Background Workers
Not supported
Background Workers
Supported
Data Processing
Supported
Data Processing
Not supported
Edge Request Processing
Not supported
Edge Request Processing
Supported
Real-Time Applications
Not supported
Real-Time Applications
Supported
Scheduled Jobs
Supported
Scheduled Jobs
Supported
Static Sites
Not supported
Static Sites
Supported
Web Applications
Supported
Web Applications
Supported
Capabilities
Compute Autoscaling
Supported
Compute Autoscaling
Supported
Deployment Rollbacks
Supported
Deployment Rollbacks
Supported
Deployment Traffic Splitting
Supported
Deployment Traffic Splitting
Supported
Preview Environments
Not recorded
Preview Environments
Supported
Scale to Zero
Supported
Scale to Zero
Not recorded

Development & Execution

Deployment & packaging
Docker / OCI
Supported
Docker / OCI
Not supported
Local Emulator
Supported
Local Emulator
Supported
Serverless (Managed Runtime)
Supported
Serverless (Managed Runtime)
Supported
Runtimes
.NET Runtime
Supported
.NET Runtime
Not supported
Custom Runtime
Supported
Custom Runtime
Not supported
JVM
Supported
JVM
Not supported
Node.js
Supported
Node.js
Not supported
Python Runtime
Not supported
Python Runtime
Supported
V8 Isolates
Not supported
V8 Isolates
Supported
Languages
C
Not supported
C
Supported
C#
Supported
C#
Not supported
C++
Not supported
C++
Supported
Go
Supported
Go
Not supported
Java
Supported
Java
Not supported
JavaScript
Supported
JavaScript
Supported
Python
Supported
Python
Supported
Ruby
Supported
Ruby
Not supported
Rust
Supported
Rust
Supported
TypeScript
Supported
TypeScript
Supported
Triggers
Database Events
Supported
Database Events
Supported
Direct Invocation
Supported
Direct Invocation
Supported
Edge Events
Not supported
Edge Events
Supported
Event Streams
Supported
Event Streams
Not supported
HTTP Requests
Supported
HTTP Requests
Supported
Publish-Subscribe Topics
Supported
Publish-Subscribe Topics
Not supported
Queue Messages
Supported
Queue Messages
Supported
Scheduled Invocation
Supported
Scheduled Invocation
Supported
Storage Events
Supported
Storage Events
Supported

Pricing

Billing basis
Resource based AWS Lambda On-Demand Usage
Plan based Cloudflare Workers Plans
Requests / executions
  • Requests — $0.20 · per 1 million requests
  • Requests — $0.30 · per additional million requests
Compute
  • x86 execution duration — $0.0000166667 · per GB-second
  • CPU time — $0.02 · per additional million CPU milliseconds
Free entry / commitment
Recurring free allowances
Recurring free allowances

Infrastructure & Availability

Infrastructure provider
  • Amazon Web Services
  • Own Network
Execution & placement
  • Execution: Single Region
  • Execution: Multi Region
  • Scope: Regional
  • Execution: Edge
  • Scope: Global
Availability footprint
  • 38 Regions
  • 348 Locations

Resource & Execution Limits

Execution time
15 minutes Per invocation
Unknown
Memory
128-10,240 MB Per function
128 MB Per isolate
Concurrency
1,000 Default regional account quota
Unknown
Request payload
6 MB request / 6 MB response Per invocation
Unknown

Security & Compliance

Access & identity
Access Control
IAM execution roles, identity policies and resource policies
Workers Platform Admin and read-only roles Cloudflare account
Audit Logging
AWS CloudTrail management events Some data-event coverage requires configuration
Unknown
Encryption & secrets
Secrets Management
AWS Secrets Manager integration Separate AWS service; customer IAM configuration required
Encrypted Worker secrets and Secrets Store bindings
Encryption at Rest
AWS-managed encryption; customer-managed KMS keys supported Coverage depends on Lambda data type
Unknown
Network isolation & protection
Private Networking
Customer VPC access Functions still run in a Lambda-managed VPC
Unknown
Network Isolation
Unknown
V8 isolates with process sandbox and trust cordons Workers runtime
Assurances & programs
FedRAMP
Class C / Class D East/West / GovCloud respectively
Unknown
HIPAA
HIPAA eligible Executed AWS BAA and customer controls required
Unknown
SOC Reports
Unknown
SOC 2 Type II Workers in scope; all plans
PCI DSS
Unknown
PCI DSS v4.0 Level 1 Workers in scope