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?
- Ask for workflows, not clicksHave the agent write CI jobs for each stage so every step is repeatable.
- Feed it the failuresLet it read the failing run's logs and propose a fix with a reason.
- Fix data portabilityExpect role and setting differences between managed databases.
- Get TLS right before cut-overMake sure the origin serves HTTPS on port 443 if your proxy requires it.
- 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.
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?
Was there downtime?
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.