Skip to content
vercel-migration-deep-dive logo

Vercel Migration Deep Dive

vercel-migration-deep-dive

Migrate to Vercel from other platforms or re-architecture existing Vercel

SKILL.md

Full skill instructions

Vercel Migration Deep Dive

Overview

Migrate applications to Vercel from Netlify, AWS (Lambda/​CloudFront/​S3), Cloudflare Workers, or traditional hosting. Covers configuration mapping, DNS cutover, feature parity validation, and incremental migration with the strangler fig pattern.

Current State

!vercel --version 2>/​dev/​null || echo 'Vercel CLI not installed' !cat package.json 2>/​dev/​null | jq -r '.name // "no package.json"' 2>/​dev/​null || echo 'N/​A'

Prerequisites

  • Access to current hosting platform
  • Git repository with application source
  • DNS management access for domain cutover
  • Vercel account (Pro recommended for production)

Instructions

Step 1: Configuration Mapping

From Netlify:

NetlifyVercel Equivalent
netlify.tomlvercel.json
_redirects / _headersvercel.json redirects/​headers
Netlify Functions (netlify/​functions/)API routes (api/)
Netlify Edge FunctionsEdge Middleware or Edge Functions
NETLIFY_ENVVERCEL_ENV
Deploy previewsPreview deployments (automatic)
Branch deploysBranch preview URLs
// Netlify _redirects → vercel.json
// FROM: /​old-page /​new-page 301
// TO:
{
  "redirects": [
    { "source": "/​old-page", "destination": "/​new-page", "permanent": true }
  ]
}

// Netlify _headers → vercel.json
// FROM: /​* X-Frame-Options: DENY
// TO:
{
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "X-Frame-Options", "value": "DENY" }
      ]
    }
  ]
}

From AWS (Lambda + CloudFront + S3):

AWSVercel Equivalent
Lambda functionsServerless Functions (api/)
Lambda@EdgeEdge Functions / Middleware
CloudFront distributionsAutomatic CDN
S3 static hostingpublic/ directory
API GatewayAutomatic routing
CloudFront behaviorsvercel.json rewrites
AWS SAM/​CDKvercel.json
Secrets ManagerEnvironment Variables
// AWS Lambda handler → Vercel Function
// FROM:
export const handler = async (event) => {
  return { statusCode: 200, body: JSON.stringify({ hello: 'world' }) };
};

// TO:
import type { VercelRequest, VercelResponse } from '@vercel/​node';
export default function handler(req: VercelRequest, res: VercelResponse) {
  res.status(200).json({ hello: 'world' });
}

From Cloudflare Workers/​Pages:

CloudflareVercel Equivalent
WorkersEdge Functions
Pages FunctionsAPI routes
KVVercel KV or Edge Config
R2Vercel Blob
D1Vercel Postgres
wrangler.tomlvercel.json

Step 2: Migrate Functions

# Create Vercel project
vercel link

# Move function files to api/ directory
mkdir -p api
# Convert each function to Vercel format

# Install Vercel types
npm install --save-dev @vercel/​node

Step 3: Migrate Environment Variables

# Export from current platform, add to Vercel
# Netlify:
netlify env:list --json | jq -r '.[] | "\(.key)=\(.values[0].value)"' > .env.migration

# Add each to Vercel with proper scoping
while IFS='=' read -r key value; do
  echo "$value" | vercel env add "$key" production preview development
done < .env.migration

# Verify
vercel env ls

Step 4: Incremental Migration (Strangler Fig)

Route traffic incrementally from old platform to Vercel:

// Phase 1: Route /​api/​* to Vercel, keep everything else on old platform
// On old platform, add a rewrite/​proxy:
// /​api/​* → https://my-app.vercel.app/​api/​*

// Phase 2: Move static pages to Vercel
// Update DNS for staging subdomain first:
// staging.example.com → cname.vercel-dns.com

// Phase 3: Move production
// Update DNS A record: example.com → 76.76.21.21

Step 5: DNS Cutover

# Add domain to Vercel
vercel domains add example.com

# Verify domain ownership
vercel domains inspect example.com

# DNS records to set:
# Apex domain (example.com):
#   A → 76.76.21.21
#
# Subdomain (www.example.com):
#   CNAME → cname.vercel-dns.com
#
# Or transfer nameservers to Vercel:
#   NS → ns1.vercel-dns.com
#   NS → ns2.vercel-dns.com

# Wait for DNS propagation (check with dig)
dig example.com A +short
# Should return 76.76.21.21

# SSL certificate auto-provisions after DNS verification

Step 6: Validate Feature Parity

# Compare old and new deployments
# Test all routes
for path in "/" "/​about" "/​api/​health" "/​api/​users"; do
  echo "=== $path ==="
  echo "Old:"
  curl -sI "https://old.example.com${path}" | head -3
  echo "New:"
  curl -sI "https://my-app.vercel.app${path}" | head -3
done

# Compare headers
diff <(curl -sI https://old.example.com/ | sort) \
     <(curl -sI https://my-app.vercel.app/ | sort)

# Check redirects still work
curl -sI https://my-app.vercel.app/​old-page | grep Location

Migration Checklist

StepValidated
All functions converted to Vercel formatRequired
Environment variables migrated with correct scopingRequired
Redirects and headers ported to vercel.jsonRequired
DNS configured and SSL provisionedRequired
Preview deployment tested end-to-endRequired
Performance baseline compared (old vs new)Recommended
Monitoring and alerting configuredRequired
Rollback plan documented (DNS revert)Required
Old platform kept running during validation periodRecommended

Output

  • Configuration mapped from source platform to Vercel
  • Functions converted to Vercel serverless/​edge format
  • Environment variables migrated with proper scoping
  • DNS cutover completed with SSL auto-provisioning
  • Feature parity validated

Error Handling

ErrorCauseSolution
Function format mismatchAWS/​Netlify handler signatureConvert to (req, res) or Web API format
Missing env var after migrationNot added to correct environmentRe-add with vercel env add
DNS not resolvingPropagation delayWait 24-48 hours, check with dig
SSL not provisioningDNS records incorrectVerify A/​CNAME records match Vercel's requirements
404 on migrated routesDifferent path conventionsAdd rewrites in vercel.json

Resources

Next Steps

For advanced troubleshooting, see vercel-advanced-troubleshooting.

More skills from jeremylongshore

openrouter-compliance-review logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-compliance-review

Review OpenRouter integration for regulatory compliance (SOC2, GDPR,

2.8K 0
View
maintainx-data-handling logo
jeremylongshore/claude-code-plugins-plus-skills

maintainx-data-handling

Data synchronization, ETL patterns, and data management for MaintainX.

2.8K 0
View
groq-core-workflow-a logo
jeremylongshore/claude-code-plugins-plus-skills

groq-core-workflow-a

Execute Groq primary workflow: chat completions with tool use and JSON

2.8K 0
View
validating-csrf-protection logo
jeremylongshore/claude-code-plugins-plus-skills

validating-csrf-protection

Validate CSRF protection implementations for security gaps. Use when

2.8K 0
View
api-contract logo
jeremylongshore/claude-code-plugins-plus-skills

api-contract

Configure this skill should be used when the user asks about "API contract",

2.8K 0
View
ideogram-incident-runbook logo
jeremylongshore/claude-code-plugins-plus-skills

ideogram-incident-runbook

Execute Ideogram incident response with triage, mitigation, and postmortem.

2.8K 0
View
gamma-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

gamma-sdk-patterns

Reusable patterns for the Gamma REST API (no SDK exists).

2.8K 0
View
deepgram-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

deepgram-sdk-patterns

Apply production-ready Deepgram SDK patterns for TypeScript and Python.

2.8K 0
View
openrouter-upgrade-migration logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-upgrade-migration

Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model

2.8K 0
View
openrouter-common-errors logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-common-errors

Diagnose and fix common OpenRouter API errors. Use when encountering

2.8K 0
View
linear-cost-tuning logo
jeremylongshore/claude-code-plugins-plus-skills

linear-cost-tuning

Optimize Linear API usage, reduce unnecessary calls, and maximize

2.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View