
10 Tools & Tips to Upgrade Your Code with GenAI
In our recent talk, “10 Tools & Tips to Upgrade Code with genAI”, presented at Code Remix 2025, we explored how combining deterministic tools and generative AI can radically accelerate Java modernization journeys; here's a recap of the key insights.
Vinicius Senger
Amazon Employee
Published May 17, 2025
Java is at the core of Amazon and AWS with hundreds of thousands Java applications in production, from amazon.com, internal infrastructure to customer-facing services, Java powers some of our largest-scale workloads running on EC2, EKS, ECS, Lambda and even IoT workloads with AWS IoT Greengrass. That’s why we’ve heavily invested in tools like Amazon Corretto and why modernizing Java applications is critical—for us and for our customers.
We kicked things off with a nod to a phrase we coined: “Friends don’t let friends run JDK 8.” And we mean it.
We shared the story of our internal migration from JDK 8 to JDK 17 and eventually JDK 21, including a large-scale success story: 1,000+ Java apps migrated in just two days, with each migration taking ~10 minutes on average.
The results?
- >45% reduction in heap memory usage in one of our most-used services
- Millions in cost savings per month
- 90% fewer cold start failures for other workloads

Every migration journey is different, but we broke it down into four main categories:
- Simple runtime upgrades: Recompile with Java 17/21. Sometimes, it’s just that easy, but no the case most of times specially moving from 8 to 21.
- Dependency modernization and Code Syntax Transformation: Replace deprecated or outdated libraries, remove / transform deprecated code.
- Framework evolution: Move from legacy frameworks like Struts or JBoss Seam to Spring, Quarkus, or Micronaut.
- Paradigm shifts: Embrace new patterns like the Model Context Protocol (MCP) for intent-based APIs.
- Code Translation: ex. Cobol to Java; while we recently announced AWS Transform for .Net, Mainframe, and VMWare migrations, this talk was focused on Java workloads.
We demonstrated how AI-enhanced tools can modernize Java faster and more reliably:
- OpenRewrite: Ideal for deterministic code changes via customizable recipes.
- Eclipse Migration Toolkit / Windup: other popular alternatives for deterministic transformation.
- Azul JVM Inventory: Helps tracking unused code in production.
- Amazon Q Developer and CLI: Our highlight—paired with the Code Transformation Agent for automated refactoring.
- Analyzed a 20-year-old JBoss + Hibernate project
- Generated migration reports and markdown documentation
- Suggested dependency upgrades and created unit tests
- Generated OpenRewrite recipes from legacy code
- Transformed a legacy monolith to run on Spring Boot with minimal effort
- Hands-on transformation using Amazon Q Developer plugin for IntelliJ / VSCode
- CI-CD transformation using Amazon Q Developer Transformation with Github
Legacy code transformation is not just a syntax problem—it’s a context and intent problem.
- Deterministic tools (like OpenRewrite) work best for safe, structural changes.
- Generative AI (like Amazon Q Developer) adds value when understanding business logic, restructuring code, or producing modern APIs.
We likened it to machine learning: enrich your legacy codebase like you would data before training a model. Clean code in = better transformation out.
This is your moment. Don’t just upgrade—transform. Before jumping into code transformation, it’s essential to prepare your application for success. This phase is your best opportunity to modernize the codebase—not just update it:
- Break up monoliths into maintainable modules
- Audit and map third-party dependencies
- Remove dead or unused code
- Reinforce test coverage and monitoring
- Introduce sustainable development practices
Generative AI tools like Amazon Q CLI can assist at every step—scanning legacy projects, identifying obsolete classes, suggesting modularization strategies, generating unit tests, and providing clear migration roadmaps or even creating a openrewrite recipe for your specific project.
Finally, we shared actionable tips for building code that lasts:
- Embrace JDK 21—skip 17 if you can
- Use modern Java features: records, stream improvements, sealed classes
- Reduce dependency sprawl
- Stay current: Update your dependencies regularly
- Upgrading your software will decrease costs and energy consumption
- Skip Java 17 — go straight to Java 21
- Invest time preparing the transformation process
- Use significantly fewer dependencies
- Make your codebase future-proof
- OpenRewrite
- Azul JVM Inventory
- Amazon Q CLI
- Amazon Q Developer Transform in IDE
- Amazon Q Developer GitHub Integration
Java’s future is brighter than ever—with AI-powered modernization, even better. If you're running legacy Java apps, now is the time to transform them—not just for technical reasons, but for business agility, cost savings, sustainability, and long-term maintainability. Count on AWS to transform now and reach me here or on linked.in for any support or feedback.
Cheers,
Vini
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.