AWS Lambda vs Vercel Functions vs Cloudflare Workers: Serverless for Small Teams
Serverless functions have moved from an experimental architecture to a mainstream deployment pattern. The promise is real: write a function, deploy it, and let the platform handle scaling, capacity planning, and infrastructure management. You pay for what you use, not for idle servers.
But the three major serverless platforms, AWS Lambda, Vercel Functions, and Cloudflare Workers, are built on fundamentally different architectures with different trade-offs that matter enormously at the function level. Understanding those differences helps you choose the right tool and avoid the performance surprises that catch teams off guard.
The Architecture Difference That Drives Everything
AWS Lambda and Vercel Functions both run your code in isolated containers that are spun up on demand and torn down after use. The cold start problem (the latency penalty when a container is initialized) is inherent to this model.
Cloudflare Workers runs your code on Cloudflare's global edge network using the V8 JavaScript engine directly, without Node.js and without containers. This eliminates traditional cold starts but imposes strict runtime constraints: no Node.js APIs, no file system access, limited package compatibility.
This fundamental difference shapes every trade-off that follows.
Cold Start Times: The Numbers
Cold starts are the most discussed serverless performance issue. Here's a realistic picture:
AWS Lambda Cold Starts
Cold start latency depends on the runtime and the package size:
- Node.js (minimal function): 100 to 300ms
- Node.js with dependencies (100MB+ package): 500ms to 2,000ms
- Python: 200 to 500ms
- Java (without SnapStart): 1,000 to 5,000ms
- Java (with SnapStart): 100 to 200ms after snapshot restoration
- Go: 100 to 200ms (consistently fast)
- Container-based Lambda: Typically slower, 1,000 to 5,000ms
The variability in Lambda cold starts is significant. The same function can cold start in 150ms one time and 1,200ms another time based on available container inventory in the region.
Provisioned Concurrency eliminates cold starts by keeping a specified number of Lambda instances pre-warmed. Cost: approximately $0.015 per GB-hour of provisioned concurrency in us-east-1. For a 512MB function with 5 provisioned instances: roughly $0.92/day or $27/month.
Vercel Functions Cold Starts
Vercel Functions (powered by AWS Lambda underneath) have similar cold start characteristics to Lambda but with some additional latency from Vercel's routing layer.
- Node.js minimal function: 200 to 600ms
- Node.js with Next.js: 400ms to 1,500ms (the framework initialization adds overhead)
- Python/Ruby/Go (edge runtime not applicable): Similar to Lambda
Vercel's Edge Runtime (a subset of Vercel Functions using Cloudflare Workers under the hood) has near-zero cold starts, but with the same runtime restrictions as Cloudflare Workers.
Cloudflare Workers Cold Starts
This is where Cloudflare Workers stands apart. Due to the V8 isolate model (no container spin-up required), cold starts are typically under 5ms, often 1 to 2ms. The isolate starts when a request arrives and is ready in sub-millisecond time.
This is a 50 to 500x improvement over Lambda cold starts for comparable function complexity. For latency-sensitive applications where cold starts are a real user experience problem, Workers is a compelling choice.
Pricing Models
AWS Lambda Pricing
Lambda pricing has two components:
Requests: $0.20 per 1 million requests (first 1 million free/month)
Compute: $0.0000166667 per GB-second of compute time
- A 512MB function that runs for 100ms: 0.5 GB-second = $0.0000083 per invocation
- 1 million invocations at 100ms each: $8.33 in compute + $0.20 in requests = $8.53
The free tier: 1 million requests and 400,000 GB-seconds of compute per month, permanently free.
At scale, Lambda is cost-efficient. The challenge is cost modeling: Lambda costs can surprise teams when functions run longer than expected, when cold starts increase invocation duration, or when concurrent execution is high.
Vercel Functions Pricing
Vercel's serverless function pricing is bundled with their platform pricing:
- Pro plan ($20/seat/month): Includes 1,000 function execution hours/month
- Beyond included: $0.18 per GB-hour of execution
The per-execution-hour model can be harder to predict than Lambda's per-GB-second model. A function that takes 500ms with 512MB: 0.5 seconds × 0.5 GB = 0.25 GB-seconds = 0.0000694 GB-hours. For 1 million invocations: 69.4 hours × $0.18 = $12.50.
This is more expensive than Lambda for equivalent compute but simpler to operate. Vercel's value is the platform experience, not raw compute economics.
Cloudflare Workers Pricing
Workers has the most favorable pricing structure for high-request workloads:
- Free tier: 100,000 requests/day (3 million/month)
- Workers Paid plan: $5/month, includes 10 million requests/month
- Beyond 10 million: $0.30 per million requests
- CPU time: $0.02 per million ms of CPU time on the paid plan
For 100 million requests/month with 5ms of CPU time each: 10 million requests included + 90 million at $0.30 = $27, plus CPU time: 100M × 5ms = 500M ms = $0.02 × 500 = $10. Total: $42/month for 100 million requests.
Compared to Lambda at the same volume (100 million requests at 5ms each): $20 in requests + minimal compute = approximately $25 to $30. Workers is competitively priced.
The key difference: Workers pricing doesn't penalize you for cold starts (there aren't any), while Lambda's compute billing includes the cold start duration.
Runtime Constraints
AWS Lambda Runtimes
Lambda supports: Node.js, Python, Ruby, Java, Go, .NET, and custom runtimes via Lambda Layers. The execution environment is a standard Linux container. You have access to:
- Full Node.js/Python/etc. standard libraries
- File system access (read/write to /tmp, up to 10GB ephemeral storage)
- Environment variables
- VPC access for private network resources
- Execution timeout up to 15 minutes
- Memory up to 10,240MB
Lambda is the most permissive of the three runtimes. If you need to run a binary, process a file, use a native module, or make long-running operations, Lambda handles it.
Vercel Functions Runtimes
Vercel Functions support Node.js, Python, Ruby, and Go. The execution environment is similar to Lambda (containers under the hood).
Key limits:
- Response timeout: 10 seconds (Pro plan), 30 seconds (Enterprise)
- Function payload size: 4.5MB request, 4.5MB response
- Deployment size: 250MB per function, 1GB total
The restrictive timeout (10 seconds on Pro) is a real constraint for functions that do significant processing. Workarounds exist (splitting into smaller functions, using background processing via external queue), but it's a design constraint to plan around.
Cloudflare Workers Runtime
Cloudflare Workers' runtime is the most constrained:
- No Node.js: Workers run on V8 directly with Web APIs (fetch, Response, Request, URL, FormData, crypto). Node.js-specific APIs (fs, path, http, Buffer) don't work natively. Many Node.js packages won't work; some do via compatibility layers.
- CPU time limit: 10ms CPU time per request on free plan, 30ms on paid
- No file system access
- Request body size: 100MB
- Script size: 1MB compressed
The CPU time limit is particularly important. Workers are designed for lightweight request/response transformations, not heavy computation. If your function does complex data processing, image manipulation, or AI inference, Workers is not the right choice.
Workers Durable Objects extend Workers with stateful primitives (exactly-once execution, distributed state), enabling patterns like real-time collaboration, sessions, and rate limiting that would otherwise require a database call.
Use Case Fit
Where AWS Lambda Wins
- Long-running functions: Background processing, data pipelines, scheduled jobs (up to 15 minutes)
- Heavy computation: Data transformation, image/video processing, ML inference
- Native binaries and custom runtimes: ffmpeg, ImageMagick, compiled languages
- VPC resources: Functions that need to access private RDS, ElastiCache, or internal services
- Any non-JavaScript runtime: Python ML functions, Go services, Java microservices
- Compliance environments: Lambda in dedicated VPCs with private subnets satisfies most enterprise compliance requirements
Where Vercel Functions Win
- Next.js application API routes: Vercel's seamless deployment of Next.js API routes is the killer use case
- Teams without AWS expertise: Vercel abstracts the Lambda configuration complexity
- Preview environments: Every Vercel deployment creates a unique URL with fully functional serverless functions, making preview environments for PR review trivial
- Simple CRUD APIs: When you need a backend API alongside a Vercel-hosted frontend
Where Cloudflare Workers Win
- Edge transformations: Modifying request/response headers, URL rewrites, A/B testing at the network level
- Authentication middleware: JWT validation, rate limiting, bot detection at the CDN edge
- Geographic routing: Serving different content based on user location, without a round trip to a regional server
- High-volume, lightweight requests: Millions of requests per day with simple logic (proxying, caching, request enrichment)
- Real-time APIs: Workers Durable Objects for WebSocket management, presence, and collaborative features
- Extremely latency-sensitive paths: Sub-10ms response times where cold starts would be unacceptable
The DX Experience
AWS Lambda DX
Deploying and managing Lambda functions directly involves IAM roles, function configuration, VPC setup, and deployment packages. The native DX is functional but manual.
The DX improves substantially with:
- AWS SAM (Serverless Application Model): CloudFormation extension for Lambda
- Serverless Framework: Popular open-source framework for multi-cloud serverless deployment
- AWS CDK (Cloud Development Kit): Define infrastructure in TypeScript/Python
- Terraform: Industry-standard IaC that handles Lambda well
For teams using these tools, Lambda's DX is manageable. For teams without IaC expertise, Lambda's raw DX is significantly worse than Vercel or Cloudflare.
Vercel Functions DX
Vercel's DX is the simplest of the three. Add a file in the /api directory of your project, deploy, and the function is live. Environment variables, secrets, and deployment logs are in the Vercel dashboard. No infrastructure configuration.
For frontend teams who need a lightweight backend without DevOps overhead, Vercel Functions' DX is unmatched.
Cloudflare Workers DX
Cloudflare's Wrangler CLI is the primary development tool for Workers. Local development with wrangler dev is fast and accurate. Deployment with wrangler deploy is straightforward. The Pages + Workers integration allows full-stack applications on Cloudflare's network.
Wrangler's local development environment is particularly well-implemented: Miniflare (the local Workers simulator) accurately replicates the production runtime, including Durable Objects and KV storage.
Ecosystem Integrations
Lambda integrates with every AWS service: SQS, SNS, EventBridge, S3 triggers, DynamoDB Streams, Kinesis, API Gateway, Step Functions. If you're building on AWS, Lambda connects naturally to the rest of your infrastructure.
Vercel Functions connect to Vercel's ecosystem: Edge Config (low-latency config storage), Vercel KV (Redis), Vercel Postgres (Neon), Vercel Blob (file storage). For full-stack Next.js applications, these integrations are well-integrated and simple. For connecting to external services, standard fetch and API calls work as in any Node.js function.
Cloudflare Workers integrate with Cloudflare's ecosystem: KV (key-value storage), R2 (object storage, S3-compatible), D1 (SQLite at the edge), Queues, AI (inference at the edge), and Durable Objects. For teams building fully on Cloudflare, the ecosystem is self-contained and growing rapidly.
Making the Choice
Choose Lambda when: Your functions need to do serious work (processing, computation, long-running tasks), you're already on AWS, or you need specific runtimes or VPC access.
Choose Vercel Functions when: You're building a Next.js application on Vercel and need backend routes. Don't overthink it: Vercel Functions are the natural backend for Vercel frontends.
Choose Cloudflare Workers when: You need edge performance (near-zero cold starts, geographic distribution), you're building lightweight request transformations, or you want to run real-time features with Durable Objects.
For a complete hosting and serverless architecture assessment for your specific product, use our Tech Stack Picker or explore the full Vercel vs AWS vs DigitalOcean comparison. Our DevOps service also covers serverless architecture design and implementation for teams that want expert guidance. Get in touch to discuss your specific use case.
Related articles
Webflow vs Next.js: Which Should Your Business Website Use?
Webflow and Next.js are both legitimate choices for business websites in 2026. The right one depends on who is running it, how often the content changes, and what the site needs to do. This is the.
Platform & Tool ComparisonsBubble vs Custom Development: When No-Code Stops Making Sense
Bubble has made building web apps genuinely accessible to non-developers. For a certain class of product, it is the right call. For others, it becomes a ceiling you hit at the worst possible moment..