Full Stack Developer – San Francisco Bay Area (Walnut Creek), CA
Full Stack Developer – San Francisco Bay Area (Walnut Creek), CA
Kiro

Nine lessons from using AI on a large migration

Kiro

I work at AWS, but all opinions, code, and views here are my own and not those of Amazon.

I moved a 25-year-old PHP app to AWS serverless, most of it in the last several days, with an AI coding assistant, Kiro, working alongside me. I pay for Kiro myself, and I’m giving it credit because it earned it. The lessons below apply to any AI assistant. I don’t think I could have done it that quickly alone. Here is what I’d tell anyone considering the same thing. (The story is in I moved the app that started my tech career to AWS over Thanksgiving week, and the costs are in Moving to pay-per-use: what the first week cost, and the RDS surcharge I didn’t see coming.)

  1. Ask for investigation first, code second. The AI produced read-only analysis documents before writing anything. They found the real gaps, such as a new backend that covered about 70% of the listener API next to a front end that covered about 10%, before I built the wrong thing.

  2. Make decisions explicit and keep them in the repo. The parity document ends with a table of product decisions, numbered Q1 through Q21: keep answers stored the way the old app stored them so historical data stays comparable, drop the refer-a-friend game, let a listener skip a hook whose audio fails to load. The AI will happily make a reasonable choice for you. A numbered table turns “reasonable” into “what I chose”, and when we disagreed later, the table settled it.

  3. Tests are the contract. Hundreds of backend and front end tests meant I could change billing, navigation and email behavior late in the project and know within seconds if I’d broken something.

  4. Rehearse, and record measured times. My runbook marks every duration as measured or estimated. Loading the database took 21 minutes in rehearsal, and that real number replaced a guess.

  5. Put guardrails in code, not in your head. A send cap, bounce alarms and a suppression list work at 3 a.m. when I’m asleep.

  6. Keep a human at the irreversible steps. The repo has no deploy script, on purpose. Every production deploy goes through a diff first. When I deployed a pricing change this week, the diff showed exactly one Lambda function changing, which was what I expected. I also left the old servers running as the way back.

  7. Test with accounts that look like your real ones. My test account had a plain username. My customers’ usernames were email addresses, and Cognito treated them differently. The AI can’t know what your production data looks like unless you show it, so use real shapes (anonymized) in rehearsal.

  8. Managed databases have an expiry date. I had never heard of RDS Extended Support until it showed up in my bill. Kiro helped find the charge and upgrade the engine. Managed services remove patching work, not maintenance.

  9. Expect surprises anyway. The first deploys hit problems the docs hadn’t warned about: RDS no longer offered the MySQL minor version I had planned on, reserved Lambda concurrency failed against a new account’s limit, and Amplify rejected a certificate setting. The AI helped diagnose each one, and I wrote them into the notes so I wouldn’t hit them twice.

A checklist for the migration itself

  • ☐ Write a parity document: what the old app does that users depend on, and what you’ll deliberately drop. Number the decisions.
  • ☐ Do a full rehearsal against real infrastructure. Record measured durations.
  • ☐ Put a CloudFront or similar layer in front of old hostnames so old links keep working.
  • ☐ Leave the old servers alone until the new system has gone through a full cycle.
  • ☐ Test sign-in with accounts shaped like your real ones.
  • ☐ Tell the AI what you decided, and keep it written down.

Part of a series. First: I moved the app that started my tech career to AWS over Thanksgiving week. Also: Stuck in the SES sandbox? What helped me get production access approved and Moving to pay-per-use: what the first week cost, and the RDS surcharge I didn’t see coming.