RS
← Back to Insights

AWS Cloud Migration for Startups: A Practical Guide from Real Projects

2026-08-25
AWSCloud MigrationStartupsServerlessInfrastructure

Every startup hits the same inflection point. You start on a $5/month DigitalOcean droplet or a shared hosting plan. It works great for the first 100 users. Then traffic grows, the database gets slow, deployments are manual, and you realize your "infrastructure" is a single server with a pm2 process manager holding it together.

Moving to AWS is the natural next step. But most migration guides assume you are migrating from an enterprise data center. For a startup moving from a VPS, the decision is different: you are not migrating existing infrastructure — you are choosing your next architecture.

Here is how I approach AWS migrations for startups, based on projects like SubTrackHub and PulseGuard.


The Decision: Lift-and-Shift vs. Re-architecture

There are two ways to migrate to AWS:

Lift-and-Shift (Rehost)

Move your existing application as-is to an EC2 instance. Same code, same stack, just running on AWS hardware.

When to do this: You need to migrate urgently (e.g., your current host is going down) and do not have time to re-architect.

Pros:

  • Fastest migration (hours, not weeks)
  • Minimal code changes
  • Familiar stack

Cons:

  • You carry over all your architectural limitations
  • No cost optimization (you are still paying for idle servers)
  • No auto-scaling or resilience improvements

Re-architecture (Refactor)

Redesign your application to use AWS-native services: Lambda for compute, API Gateway for routing, DynamoDB or RDS for data, S3 for storage.

When to do this: You have a few weeks and want to build for the next 2–3 years of growth.

Pros:

  • Pay-per-use pricing (no idle costs)
  • Auto-scaling built in
  • Better reliability and observability
  • Modern architecture that attracts investors

Cons:

  • Requires rewriting parts of the application
  • Learning curve for AWS services
  • Takes longer (2–6 weeks)

My recommendation for startups: If your existing app is less than 2 years old and built with Node.js or Python, re-architect to serverless. The long-term cost savings and operational simplicity are worth the upfront investment.


A Practical Migration Roadmap

Here is the step-by-step process I follow when migrating a startup to AWS:

Phase 1: Audit (Days 1–2)

Before touching any infrastructure, understand what you have:

Current Stack Audit:
├── Application runtime (Node.js 18, Python 3.11, etc.)
├── Database (PostgreSQL, MongoDB, SQLite)
├── File storage (local disk, S3, Cloudflare R2)
├── Background jobs (cron, Bull, Celery)
├── External services (Stripe, email, auth)
├── Environment variables and secrets
├── Domain and DNS configuration
└── Current monthly costs

Document everything. You will need this to design the target architecture and to estimate costs.

Phase 2: Design the Target Architecture (Days 2–4)

For a typical SaaS startup, here is what I recommend:

┌─────────────────────────────────────────────────┐
│                  CDN + Edge                       │
│  CloudFront + S3 (Static Assets)                 │
│  Next.js on Vercel (Frontend)                    │
└──────────────────────┬──────────────────────────┘
                       │
┌──────────────────────▼──────────────────────────┐
│                  API Layer                        │
│  API Gateway + Lambda (Serverless)               │
│  Auto-scales 0 → ∞, pay per request              │
└──────┬───────────────────────┬──────────────────┘
       │                       │
┌──────▼──────┐    ┌───────────▼──────────┐
│  DynamoDB   │    │  RDS PostgreSQL       │
│  (Sessions, │    │  (Relational Data,    │
│   Caching)  │    │   Billing, Users)     │
└─────────────┘    └──────────────────────┘
       │
┌──────▼──────────────────────────────────────┐
│  SQS + Lambda (Background Jobs)              │
│  Email sending, data processing, webhooks    │
└──────────────────────────────────────────────┘

Phase 3: Data Migration (Days 4–7)

This is the hardest part. Here is how to approach common databases:

PostgreSQL → AWS RDS:

  1. Take a pg_dump of your current database
  2. Create an RDS PostgreSQL instance (start with db.t3.micro — ₹1,200/month)
  3. Restore the dump into RDS
  4. Update your connection string
  5. Test all queries

MongoDB → MongoDB Atlas or AWS DocumentDB:

  1. Use mongodump to export your data
  2. Import into Atlas (free tier available) or DocumentDB
  3. Update your connection string

SQLite → DynamoDB or RDS: SQLite does not migrate cleanly to cloud databases. You will need to redesign your queries. This is actually a good thing — SQLite is not designed for concurrent access.

Phase 4: Deploy and Switch (Days 7–10)

  1. Deploy your backend to Lambda (using Serverless Framework or AWS CDK)
  2. Configure API Gateway routes
  3. Set up environment variables in AWS Systems Manager Parameter Store (not .env files)
  4. Update DNS to point to the new infrastructure
  5. Monitor for 48 hours before decommissioning the old server

Serverless vs. EC2: The Real Cost Comparison

Here is an honest cost comparison for a SaaS with ~1,000 daily active users:

ResourceVPS (Current)EC2 (AWS)Lambda (AWS)
Compute$20/month (fixed)$15–30/month (t3.small)$0–5/month (pay per request)
Database$15/month (managed)$15/month (RDS db.t3.micro)$0 (DynamoDB on-demand)
Storage$5/month$5/month (S3)$1/month (S3 + Lambda)
CDN$0 (no CDN)$5/month (CloudFront)$2/month (CloudFront)
Total$40/month$40–55/month$3–13/month

The serverless option is 3–10x cheaper at startup scale. The trade-off is cold starts (mitigated with Provisioned Concurrency at ~$15/month for critical endpoints) and vendor lock-in (mitigated by keeping business logic in framework-agnostic Node.js code).


Lessons from Production

1. Start with Lambda, Graduate to Containers

When PulseGuard launched, it ran entirely on Lambda. As the check frequency increased and the worker pool grew, I migrated the monitoring workers to AWS Fargate (containers) because long-running DNS inspections and TLS handshakes are better suited to persistent processes. The API layer stayed on Lambda.

Rule of thumb: Use Lambda for request/response APIs. Use containers (ECS/Fargate) for long-running jobs, WebSocket servers, or processes that need persistent connections.

2. DynamoDB is Not a PostgreSQL Replacement

Many tutorials suggest migrating from PostgreSQL to DynamoDB. Do not do this unless your access pattern is truly key-value. DynamoDB is incredible for session storage, caching, and time-series data (like telemetry). For relational data with joins, foreign keys, and complex queries, stick with RDS PostgreSQL.

Observyze uses both: DynamoDB for trace session storage (write-heavy, key-value access), and MongoDB for aggregated analytics (read-heavy, complex queries).

3. Use AWS CDK, Not Console Clicks

Infrastructure as Code (IaC) is not optional for production. If you configure your Lambda function through the AWS Console, you cannot reproduce it. Use AWS CDK or Serverless Framework so your infrastructure is version-controlled, reviewable, and reproducible.

4. Secrets Belong in Parameter Store, Not .env Files

Never deploy environment variables through .env files in production. Use AWS Systems Manager Parameter Store or Secrets Manager. They are encrypted at rest, auditable, and integrate with IAM for access control.


Migration Checklist

  • Audit current stack and document all dependencies
  • Design target architecture (Lambda + API Gateway + RDS/DynamoDB)
  • Set up AWS account with billing alerts
  • Create IAM roles with least-privilege permissions
  • Migrate database to RDS/DynamoDB
  • Deploy backend to Lambda via CDK/Serverless Framework
  • Set up CI/CD pipeline (GitHub Actions → AWS)
  • Configure CloudFront CDN for static assets
  • Move secrets to Parameter Store
  • Update DNS and monitor for 48 hours
  • Decommission old VPS

The Bottom Line

Migrating to AWS is not just a hosting change — it is a bet on your future architecture. For startups, serverless (Lambda + API Gateway) is almost always the right choice: it scales to zero when you have no users, scales to infinity when you do, and costs nothing until you have real traffic.

The migration takes 1–2 weeks for a typical SaaS. The long-term cost savings and operational simplicity make it one of the highest-ROI investments a startup can make.


Migrating your startup to AWS? I have built and migrated production SaaS platforms to serverless AWS architectures. Get in touch to discuss your migration.