Choosing a Deployment Platform for APIs and MVPs#

Picking a deployment platform early in a project matters more than most teams realize. The platform determines your cost floor, your scaling ceiling, your deployment workflow, and how much operational overhead you carry. Switching later is possible but never free – you are always migrating data, rewriting config, and updating DNS.

This guide compares four platforms that cover the most common deployment scenarios: Cloudflare (Workers + D1 + Pages), AWS (Lambda + API Gateway + RDS + S3), Vercel (Pro + serverless functions), and Fly.io (Apps + Postgres). Each has a genuine sweet spot. None is best for everything.

Decision Matrix: Project Type x Platform#

Project TypeBest FitRunner-UpAvoid
Static site + blogCloudflare PagesVercelAWS (overkill)
API-only backendCloudflare WorkersFly.ioVercel (oriented toward frontend)
Full-stack web app (Next.js/Remix)VercelFly.ioCloudflare (limited SSR runtime)
REST/GraphQL API + relational DBCloudflare (Workers + D1)Fly.io (Apps + Postgres)Vercel (no managed DB)
Docker-based microservicesFly.ioAWS (ECS/Fargate)Cloudflare (no containers in GA)
Data pipeline / heavy computeAWS (Lambda + Step Functions)Fly.io (dedicated VMs)Cloudflare (CPU limits)
Real-time / WebSocket appFly.ioCloudflare (Durable Objects)Vercel (no persistent connections)
Multi-region, latency-sensitiveCloudflare WorkersFly.ioAWS (requires explicit multi-region)

Cost Comparison at Scale#

Costs include compute, database, storage, and bandwidth. All estimates assume a typical API-backed web application with a relational database.

Hobby Scale ($0/month target)#

PlatformWhat You Get FreeMonthly Cost
Cloudflare100K req/day, D1 (5B reads, 5 GB), KV (100K reads/day), R2 (10 GB), Pages (unlimited bandwidth)$0
AWSLambda (1M req/mo, 400K GB-s), API Gateway (1M calls), S3 (5 GB), DynamoDB (25 GB). RDS is NOT free-tier-forever$0 (12-month limit on many services)
Vercel100 GB bandwidth, serverless functions (100 GB-hrs), edge functions, one project. No managed DB$0
Fly.io3 shared VMs, 3 GB persistent storage, 160 GB bandwidth$0

Winner at hobby scale: Cloudflare. The free tier includes a relational database (D1), object storage (R2), KV cache, and unlimited Pages bandwidth with no time limits. AWS free tier expires after 12 months for key services like RDS and EC2.

Small Scale (~1,000 users, ~1M requests/month)#

PlatformStackMonthly Cost
CloudflareWorkers ($5 plan) + D1 (within free) + KV (within free) + R2 (within free) + Pages~$5
AWSLambda + API Gateway + RDS db.t3.micro + S3 + CloudFront~$25-40
VercelPro ($20) + external DB (PlanetScale/Neon ~$0-10)~$20-30
Fly.io1-2 shared VMs ($3-7) + Fly Postgres ($0-7)~$5-15

Medium Scale (~10,000 users, ~10M requests/month)#

PlatformStackMonthly Cost
CloudflareWorkers ($5 + minor overage) + D1 ($5-15) + KV ($5) + R2 (~$5)~$15-30
AWSLambda + API GW + RDS db.t3.small + S3 + CloudFront + NAT Gateway~$100-200
VercelPro ($20) + DB ($25-50) + bandwidth overages~$70-120
Fly.io2-4 VMs ($15-30) + Postgres ($15-30)~$30-60

Growth Scale (~100,000 users, ~100M requests/month)#

PlatformStackMonthly Cost
CloudflareWorkers ($5 + $27 overage) + D1 ($30-60) + KV ($25) + R2 (~$20)~$80-150
AWSLambda + API GW + RDS db.r5.large + ElastiCache + S3 + CloudFront + NAT GW~$500-1,500
VercelEnterprise (custom) or Pro with overages~$300-800
Fly.io4-8 VMs ($50-120) + Postgres HA ($60-120) + bandwidth~$150-300

The cost gap between Cloudflare and AWS widens dramatically at scale. Cloudflare charges per operation with no bandwidth fees. AWS charges per operation AND per instance-hour AND per GB of data transfer AND per NAT Gateway byte.

Free Tier Comparison#

FeatureCloudflareAWSVercelFly.io
Compute100K req/day (no expiry)1M req/mo Lambda (12-month limit on some)100 GB-hrs serverless3 shared VMs
DatabaseD1: 5B reads, 100M writes, 5 GBDynamoDB: 25 GB. RDS: 12 months onlyNone (bring external)3 GB Postgres storage
Object StorageR2: 10 GB, $0 egressS3: 5 GB (12-month)NoneNone
KV/CacheKV: 100K reads/dayElastiCache: none freeEdge Config (limited)None
BandwidthUnlimited (Workers, Pages, R2)CloudFront: 1 TB/mo (12-month)100 GB/mo160 GB/mo
Custom DomainsUnlimited, free SSLVia CloudFront or ALB1 per project (free)Unlimited, free SSL
ExpiryNever12 months for mostNeverNever

Platform Strengths and Weaknesses#

Cloudflare (Workers + D1 + Pages)#

Strengths:

  • Runs at 330+ edge locations globally with no configuration
  • Zero egress fees on R2 and Workers
  • Sub-5ms cold starts (V8 isolates, not containers)
  • Integrated ecosystem (compute, DB, cache, storage, DNS, CDN in one dashboard)
  • Free tier is genuinely production-capable with no expiry
  • wrangler deploy deploys globally in seconds

Weaknesses:

  • 128 MB memory limit per Worker
  • 30s CPU time limit (paid plan) – no long-running jobs
  • D1 is single-writer with 10 GB max – not for write-heavy workloads
  • No container support in GA (Containers is beta)
  • Smaller ecosystem of tutorials, Stack Overflow answers, and third-party integrations compared to AWS
  • Some npm packages that depend on Node.js APIs do not work in the Workers runtime

Best for: APIs, static sites, edge applications, projects where cost efficiency and global latency matter. Teams that want to ship fast without infrastructure management.

AWS (Lambda + API Gateway + RDS + S3)#

Strengths:

  • The most comprehensive cloud platform – a service for literally everything
  • Battle-tested at every scale from startup to Fortune 500
  • Massive ecosystem of tools, tutorials, consultants, and managed services
  • Granular IAM for security-sensitive workloads
  • Services like Step Functions, SQS, SNS, EventBridge enable complex event-driven architectures

Weaknesses:

  • Expensive at small-to-medium scale (NAT Gateway alone costs $32/month + $0.045/GB)
  • Complex pricing with dozens of line items per service
  • Cold starts on Lambda (100ms-1s depending on runtime and VPC)
  • Operational overhead: VPCs, security groups, IAM roles, CloudFormation/Terraform
  • Free tier expires after 12 months for key services (RDS, EC2, CloudFront)
  • Data transfer charges ($0.09/GB out) add up fast

Best for: Enterprise applications, complex event-driven architectures, workloads requiring specific AWS services (SageMaker, Redshift, Kinesis), teams with existing AWS expertise.

Vercel#

Strengths:

  • Best-in-class developer experience for Next.js, Remix, and frontend frameworks
  • Preview deployments for every PR with instant rollback
  • Edge Functions for low-latency middleware
  • Built-in analytics and performance monitoring
  • Zero-config deployments (git push and done)

Weaknesses:

  • No managed database (you bring PlanetScale, Neon, Supabase, etc.)
  • Expensive at scale – bandwidth overages and function execution add up
  • Oriented toward frontend/full-stack frameworks – not ideal for API-only backends
  • Serverless functions have a 10s default timeout (60s on Pro)
  • No persistent connections (WebSockets require external services)
  • Vendor lock-in for framework-specific optimizations (ISR, edge middleware)

Best for: Next.js and React applications, frontend teams that want zero-ops deployment, projects where developer experience is the top priority.

Fly.io#

Strengths:

  • Run any Docker container globally with simple CLI (fly launch)
  • Full Linux VMs with persistent volumes – run anything (Postgres, Redis, custom binaries)
  • Multi-region by default with automatic request routing
  • WebSocket and long-running connection support
  • Good middle ground between serverless simplicity and container flexibility
  • Built-in Postgres and Redis as managed add-ons

Weaknesses:

  • Higher baseline cost than serverless (VMs run 24/7 unless you scale to zero)
  • Smaller community and ecosystem than AWS or Vercel
  • Scale-to-zero support exists but is less mature than serverless platforms
  • Storage options are limited (persistent volumes, not managed object storage)
  • Networking can be complex for multi-region setups with Fly Postgres

Best for: Docker-based applications, projects needing persistent connections (WebSockets, gRPC), teams that want global deployment without serverless constraints.

When to Outgrow Each Platform#

Outgrowing Cloudflare Workers#

  • D1 write throughput becomes a bottleneck (sustained high writes)
  • You need more than 128 MB memory per request
  • Jobs routinely exceed 30s CPU time
  • You need container-based workloads (ML inference, video processing)

Migration path: Move database to Neon/Supabase (Postgres, SQL is portable). Move compute to Fly.io or AWS Lambda. Keep R2 for storage and Pages for static content – no reason to leave those.

Outgrowing AWS Lambda#

  • You need long-running processes (>15 min) or persistent connections
  • Cold starts are unacceptable for your latency requirements
  • You want simpler deployment than CloudFormation/SAM/CDK

Migration path: Move to ECS/Fargate (containers on AWS) or Fly.io. Data stays on AWS (RDS, S3).

Outgrowing Vercel#

  • Bandwidth costs exceed your budget
  • You need backend-only APIs without a frontend framework
  • You need persistent connections or long-running tasks

Migration path: Move API to Cloudflare Workers or Fly.io. Keep Vercel for the frontend if it is a Next.js app. Split frontend and backend deployments.

Outgrowing Fly.io#

  • You need managed services (ML, data warehousing, event streaming)
  • Compliance requires specific cloud certifications (FedRAMP, HIPAA BAA)
  • You need the breadth of AWS/Azure/GCP service catalog

Migration path: Move to AWS ECS/EKS or GKE. Dockerized apps are portable by design.

Migration Portability#

LayerPortabilityNotes
Application codeHigh (if using web standards)Workers use Fetch API – works anywhere. Fly.io runs Docker – runs anywhere. Lambda handlers need adapters
Database schemasHigh (SQL is SQL)D1 (SQLite), RDS (Postgres/MySQL), Fly Postgres – all speak SQL. Schema migration is straightforward
Object storageHigh (S3 API is universal)R2, S3, GCS, MinIO all support the S3 API. rclone sync moves data between them
DNS/domainsHighDNS records move in minutes. Custom domain setup is trivial on all platforms
CI/CD pipelinesMediumGitHub Actions works with everything. Platform-specific deploy commands change
Caching layerLowKV, ElastiCache, Vercel Edge Config are all different. Cache logic needs rewriting
Platform-specific featuresLowDurable Objects, Vercel ISR, Fly.io Machines API – these do not port

Recommendation Framework#

Answer these three questions:

  1. What is your project type? Static site, API, full-stack app, or Dockerized service. This narrows to 1-2 platforms (see decision matrix above).

  2. What is your budget? If $0 for the first year matters, Cloudflare and Fly.io have the best permanent free tiers. AWS free tier expires. Vercel free tier is limited.

  3. What is your scaling ceiling? If you anticipate 100K+ users, Cloudflare has the flattest cost curve. AWS has the most services but the steepest cost curve. Fly.io and Vercel fall in between.

When in doubt, start with Cloudflare Workers for APIs and static sites. The free tier covers most hobby and small-scale projects, the cost curve is flat, and the deployment workflow is simple. Move to Fly.io if you need containers, or AWS if you need the depth of managed services.