← Back
AWS ML Blog

Build a repeatable PHP-to-Java migration engine with Kiro

•11 min read•
#agents
Level:Advanced
For:AI Engineers
✦TL;DR

This article introduces a repeatable PHP‑to‑Java migration engine built on Kiro, an AI‑integrated IDE that pairs an AI agent with your codebase to execute an eight‑phase, multi‑step workflow. The engine treats the original PHP app (requiring PHP 8.0+) as the specification and generates idiomatic Java 21 Spring Boot projects, validated by a parity harness before each phase is approved. It can be run interactively in Kiro or at scale via AWS Transform, which consumes the same skill files to automate migration while preserving the same approval checkpoints.

⚡ Key Takeaways

  • The migration engine uses Kiro skill files named **php-to-java-migration** and **php-model-discovery** to encode the methodology.
  • Engineers must run the engine on a machine with **PHP 8.0 or newer** and **Java 21 with Maven** installed.
  • The workflow consists of **eight phases** with explicit approval gates, including discovery manifest review and rulebook approval.
  • Integration with **AWS Transform** allows the same skill files to be executed agentically for large‑scale migrations.
  • The generated Java code is considered correct only after passing a **parity harness** that verifies functional equivalence.

🔧 Tools & Libraries

KiroAWS Transform
💡 Why It Matters

By codifying migration knowledge into versioned skill files, teams can reliably port legacy PHP applications to type‑safe Java at both single‑project and portfolio scales, reducing manual rewrite effort and ensuring functional parity.

✅ Practical Steps

  1. Open the repository root as a **Kiro workspace**; the php-to-java-migration skill files activate automatically.
  2. Invoke Kiro to start the migration, then sequentially approve each of the eight workflow phases (e.g., discovery manifest, rulebook) as prompted.
  3. For bulk migrations, hand the same skill files to **AWS Transform**, which will run the workflow autonomously while still presenting the defined approval checkpoints.

Want the full story? Read the original article.

Read on AWS ML Blog ↗

More like this

New in AWS Quick: More capable flows, an updated web experience, and agents that work together

AWS ML Blog•#agents

How Google Duplex evolved to also call businesses for you in Gemini

Google Research•#agents

Genie ZeroOps, now in public beta: An autonomous agent that fixes data pipelines, with lessons from 80,000 customer issues

Databricks Blog•#agents

Towards a Science of Capable Autonomous Agents & Provable Safety — Part II

CMU ML Blog•#agents

EXPLORE AI NEWS

Daily hand-picked stories on LLMs, RAG, agents and production AI — curated for engineers who ship.

BROWSE NEWS

GET THE WEEKLY DIGEST

Join engineers getting the Monday signal-over-noise AI breakdown. No spam, unsubscribe anytime.

LEARN AI ENGINEERING

Curated courses, research papers, repos and tutorials built for engineers leveling up in AI.

START LEARNING