← Back to library

Move a side project between clouds via agent-written CI

Anand Rathnas, an indie developer on DEV Community, relocated his link-shortening SaaS off AWS and onto DigitalOcean within about four hours with live traffic and no downtime, to save on hosting. Claude Code wrote GitHub Actions workflows for provisioning, database seeding, TLS and deployment, then studied each failed run's logs to fix problems like a database owner mismatch.

  • OutcomeShift a small app to a cheaper host in a morning, with the agent writing and fixing the deployment workflows as they fail.
  • SetupAn afternoon+
  • LevelAdvanced
  • CreditAnand Rathnas
View original
Works with
Claude Code

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

When should you use it?

  • A small app costs more than it should on its current host
  • Infrastructure changes already run through CI
  • You can test the new stack before switching DNS

Not for: Large production systems without a rollback plan; Teams that forbid agents touching deployment pipelines

What do you need, and what do you get?

You need

  • Access to both cloud accounts
  • A recent database dump
  • DNS and certificate control

You get

  • Workflows that provision and configure the new host
  • A migrated database
  • A cut-over with TLS working

How does it work, step by step?

  1. Ask for workflows, not clicksHave the agent write CI jobs for each stage so every step is repeatable.
  2. Feed it the failuresLet it read the failing run's logs and propose a fix with a reason.
  3. Fix data portabilityExpect role and setting differences between managed databases.
  4. Get TLS right before cut-overMake sure the origin serves HTTPS on port 443 if your proxy requires it.
  5. Test routes, then switchCheck deep links and admin pages before you point DNS at the new host.

The prompt

Our own prompt, inspired by Anand Rathnas and written to work in Claude Code. Values in lime are placeholders.

Prompt0 variables
We are moving this app from [current host] to [new host]. Write GitHub Actions workflows for: creating the infrastructure, configuring the server, restoring the database dump, setting up TLS for the origin, and deploying. Never change DNS. After each workflow run, read the logs with the GitHub CLI, explain any failure and propose a fix before editing. Keep the old environment untouched until I confirm the cut-over.

Inspired by Anand Rathnas: How Claude Code Helped Me Migrate from AWS to DigitalOcean in 4 Hours (With Live Traffic). The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • The dump referenced a database role that did not exist on the new host, causing dozens of errors until rewritten.
  • A proxy rule appended paths and broke single-page app routes.

Our take

The method in Anand Rathnas's migration is worth more than the speed. Asking for workflows rather than manual console clicks meant every step became code that runs the same way twice, and every failure produced a log the agent could read. Errors like a database owner mismatch or an nginx routing mistake are exactly the kind of thing an agent diagnoses well when given the real output instead of a description. You also end up with repeatable infrastructure, which makes the next move or a disaster recovery far easier. For a live service, plan the cutover carefully. Lower DNS time-to-live a day ahead so a switch, and a switch back, takes effect quickly. Keep the old stack running and its database untouched until the new one has served real traffic without errors, and compare row counts after seeding. Get TLS certificates issued and tested before moving traffic. Keep cloud credentials in repository secrets with the narrowest permissions, and review each workflow before it runs against production. Delete the old resources only after a quiet week.

Where the time goes back: Weeks of planned migration work shrink to a morning because each failure is diagnosed from logs and patched immediately.

FAQ

What did the move save?
The author estimates his monthly hosting bill fell by about 63 percent.
Was there downtime?
He reports none, completing the move in roughly four hours.

Source and credit

Inspired by Anand Rathnas. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
How Claude Code Helped Me Migrate from AWS to DigitalOcean in 4 Hours (With Live Traffic)
Creator
Anand Rathnas
Published on
DEV Community (dev.to)
Original date
Jan 8, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Claude Code
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in IT & Security

All 82 IT & Security playbooks →

Related playbooks

IT & SecurityWorkflow✓ AI dry run

Compare an agent run with a task you did by hand

Before you believe big productivity claims, time and cost one routine agent task against a similar one you did yourself, counting review and cleanup.

Credit: Chris_Newton on Hacker News

Under an hour
IT & SecuritySkill✓ AI dry run

Find repeat fixes and good habits in your team's PRs

Have Claude Code look across a chosen window of commits and pull request review comments for the same fix or review note coming up again and again, suggest turning the top ones into a project rule or skill you write in your own words, and list good practices already in the repo that other teams could copy.

Credit: anthropics

Under an hour
IT & SecurityWorkflow✓ AI dry run

Hands-free voice loop for a coding agent

Add on-device voice input and spoken replies to your coding agent, with a tap to interrupt, so you can steer it while cooking or cleaning.

Credit: yberreby on Hacker News

An afternoon+
IT & SecurityWorkflow✓ AI dry run

Have a different model family critique the spec

Plan a spec with one model, have a model from another family critique it, then write tests, build and review against that spec.

Credit: u/wczaja on r/ClaudeAI

Under an hour