Cloud / Infrastructure

Cloudflare vs AWS

The edge-first challenger vs the cloud giant. One keeps it simple, the other has a service for everything. Here's when each one wins.

⚑ Our Verdict

Cloudflare for edge-first simplicity. AWS when you need everything.

Cloudflare's developer experience, zero egress fees, and edge-native architecture make it the better starting point for most builders. AWS is the answer when you need managed databases, ML pipelines, or enterprise compliance at scale.

Best for: Building / Scaling Consider AWS if: You need 200+ managed services or strict compliance
Cloudflare

Cloudflare

Edge-first platform with Workers, R2, D1, and zero egress fees

VS
AWS

AWS

The everything cloud, 200+ services for any workload imaginable

Feature Comparison

FeatureCloudflareAWS
ComputeWorkers, edge, sub-ms cold startsLambda, EC2, ECS, Fargate, etc.
Object StorageR2. S3-compatible, zero egressS3, industry standard
DatabaseD1 (SQLite at edge), HyperdriveRDS, DynamoDB, Aurora, Redshift
CDN / Edge350+ cities, built-in by defaultCloudFront, powerful but separate
DNSFastest DNS globally, free tierRoute 53, reliable, pay per query
DDoS ProtectionUnlimited, free on all plansShield Standard free, Advanced $3K/mo
Egress FeesZero on R2 and WorkersSignificant, often the biggest cost
Developer ExperienceWrangler CLI, simple dashboardComplex console, steep learning curve
Service Breadth~20 core services200+ services for every use case
ComplianceSOC 2, ISO 27001FedRAMP, HIPAA, PCI, SOC, ISO, etc.

Pricing

Cloudflare Workers

$5/mo
  • 10M requests/mo included
  • Zero egress fees on R2
  • Free tier: 100K requests/day
  • Predictable, simple pricing

AWS Lambda

Pay-per-use
  • 1M free requests/mo
  • $0.20 per 1M requests after
  • Plus compute time + egress fees
  • Complex pricing across 200+ services

When to Use Each

🟠 Use Cloudflare when…

  • You're building APIs, sites, or apps that benefit from edge
  • You want predictable pricing with zero egress fees
  • You need a CDN, DNS, and DDoS protection built in
  • You're a solo builder who values simplicity
  • You're serving lots of static assets or media files

🟑 Use AWS when…

  • You need managed relational databases (RDS, Aurora)
  • You're building ML/AI pipelines (SageMaker, Bedrock)
  • You need strict compliance (HIPAA, FedRAMP, PCI)
  • Your architecture requires tight service integration
  • You're at enterprise scale with dedicated infrastructure

🎯 Our Recommendation

For indie hackers and startups, start with Cloudflare. Workers + R2 + D1 + Pages gives you a complete stack with incredible DX, zero egress fees, and global edge performance out of the box. You can build and scale remarkably far before hitting limits. When you need managed Postgres, ML services, or enterprise compliance, add specific AWS services alongside, they're not mutually exclusive. The smartest builders use Cloudflare as their default and AWS as their specialist.

Frequently Asked Questions

Is Cloudflare a replacement for AWS?

Not entirely. Cloudflare excels at edge computing, CDN, DNS, and security, and with Workers, R2, D1, and Queues it covers many use cases. But AWS has 200+ services including managed databases, ML/AI, IoT, and enterprise tooling that Cloudflare doesn't offer. For many solo builders and startups, Cloudflare's stack is sufficient. For complex enterprise needs, AWS remains hard to replace.

Is Cloudflare cheaper than AWS?

Generally yes, especially for bandwidth. Cloudflare has zero egress fees on R2 (their S3 alternative), while AWS charges significant egress on S3 and other services. Cloudflare Workers has a generous free tier (100K requests/day). AWS can get expensive fast if you don't watch bandwidth and compute costs carefully.

Can I use Cloudflare Workers instead of AWS Lambda?

For many use cases, yes. Workers run on Cloudflare's edge network (350+ cities) with sub-millisecond cold starts, while Lambda has variable cold starts and runs in specific regions. Workers are better for low-latency APIs, middleware, and edge logic. Lambda is better when you need long execution times, VPC access, or tight integration with other AWS services.

What is Cloudflare R2 and how does it compare to S3?

R2 is Cloudflare's object storage service with an S3-compatible API. The killer feature is zero egress fees, you pay only for storage and operations, not bandwidth. For apps that serve lots of files (images, videos, downloads), R2 can be dramatically cheaper than S3. It supports the same SDKs and tools as S3.

Should a startup use Cloudflare or AWS?

For most startups building web apps and APIs, Cloudflare's stack (Workers + R2 + D1 + Pages) is simpler, cheaper, and faster to ship with. Start with Cloudflare for its simplicity and predictable pricing. Move specific services to AWS only when you hit Cloudflare's limits, like needing managed Postgres, ML pipelines, or enterprise compliance features.

⚑

Still deciding?

Tell us what you are building and we will pick the right tool for you. Or if you are ready to switch, we can help you move without breaking things.

Build my stack β†’ Plan my switch β†’

Free. No signup required.

Want someone to choose for you?

Get a Decision Memo (£29) →

Personalised recommendation with rationale, based on your use case.