Vercel vs AWS vs self-hosting: where should you run a Next.js app?

Hosting Next.js on Vercel, AWS, Cloudflare or containers compared on cost, features, performance, data residency and operations.

INDI TECHNOLOGY4 min read

Next.js is built by Vercel, and it works best on Vercel: every feature works out of the box, previews appear for every pull request, and there's nothing to run. But as traffic grows, teams often ask whether it's worth the cost, and regulated companies ask where the data goes. The alternatives are real: AWS (Amplify or OpenNext), Cloudflare, Netlify, or containers on your own cloud.

At a glance

Vercel AWS Amplify / OpenNext on AWS Containers (ECS, Cloud Run, Kubernetes) Cloudflare (Workers via OpenNext)
Next.js feature support Complete, first to support new features Good; some lag on newest features Complete in Node server mode; caching needs setup Good; some Node APIs limited
Preview deployments Excellent, built in Built in (Amplify) or build your own Build your own Built in
Operations effort None Low to moderate Moderate Low
Cost at low traffic Free or low Low Low to moderate Very low
Cost at high traffic Can grow quickly (bandwidth, functions, image optimisation) Usually lower Usually lowest per request Usually low
Data residency control Choose function regions; edge network is global Full: your AWS account and region Full Limited by edge model
Fits your cloud security setup Separate platform Yes Yes Separate platform

Vercel

Strengths: the best developer experience for Next.js. Preview URLs for every branch, instant rollbacks, built-in caching, image optimisation, analytics and security features, with new Next.js features supported immediately. For small teams, the time saved is worth a lot.

Watch out for: costs that scale with usage: bandwidth, function execution, image optimisation and edge requests. A traffic spike or an inefficient page can produce a big bill. Also check data handling for regulated workloads: you can pin serverless functions to a region (including Mumbai), but you should confirm where logs, caches and other data are processed.

AWS (Amplify or OpenNext)

AWS Amplify Hosting supports Next.js with server-side rendering, previews and a managed pipeline. OpenNext is an open-source adapter that packages Next.js for AWS Lambda, CloudFront and S3 (with infrastructure tools such as SST), giving near-complete feature support inside your own account.

Strengths: your app runs inside your AWS account and region, next to your databases, behind your security controls and on your bill. Usually cheaper at scale.

Watch out for: more setup and maintenance, occasional lag when Next.js ships new features, and Lambda cold starts on rarely visited pages.

Containers (self-hosting)

Next.js can run as a normal Node.js server (output: "standalone") in a container on ECS, Cloud Run, Kubernetes or a VM. Every feature works in this mode. You need to configure:

  • a shared cache (for ISR and data caching) when running more than one instance, for example Redis/Valkey or a custom cache handler
  • image optimisation (built-in with sharp, or an image CDN)
  • a CDN in front (CloudFront, Cloudflare or your cloud's CDN) for static assets and cached pages

Strengths: predictable cost, full control, works on any cloud, fits strict compliance needs. Weakness: you build preview environments and scaling yourself (see Kubernetes vs ECS vs Cloud Run).

Cloudflare

With the OpenNext adapter, Next.js runs on Cloudflare Workers, close to users worldwide and often very cheaply. Some Node.js APIs and libraries aren't available in the Workers runtime, so test your dependencies.

Do you need a server at all?

If your site is mostly content, consider static export (output: "export") or a content-first framework like Astro, hosted on S3 and CloudFront or any static host. It's the cheapest, fastest and simplest option. This website is a prerendered React app served from S3 and CloudFront.

Choose Vercel if…

  • you're a small team that values speed and previews over hosting cost
  • traffic is moderate and predictable
  • you want new Next.js features on day one

Choose AWS (Amplify or OpenNext) if…

  • the rest of your system is on AWS and you want everything in one account
  • you need data residency and your own security controls
  • hosting costs on Vercel are growing significantly

Choose containers if…

  • you need full control, predictable costs or on-premises and multi-cloud options
  • you have DevOps capability to run them
  • your compliance team wants everything in your own cloud

Recommendation by situation

Situation Pick
Startup MVP or marketing site with app Vercel
SaaS on AWS with growing traffic OpenNext or Amplify on AWS
Regulated fintech or health app Containers in your own cloud (Indian region)
High-traffic e-commerce storefront Containers or OpenNext with a CDN; Vercel Enterprise if budget allows
Content-only site Static export on S3/CloudFront or Cloudflare

Summary

Vercel gives the best Next.js experience and is worth it for many teams. Move to AWS or containers when cost, data residency or security integration matter more than convenience. And check whether you need a server at all.

We deploy and run Next.js and other web apps on Vercel, AWS, Cloudflare and containers through our cloud and infrastructure work. Ask us to estimate your hosting costs.

Terms in this article

Any idea in mind? Let's make it real.

Tell us what you're building. You'll hear back from an engineer, not a sales team, usually within one working day.

Book a 30-min call