I recently experimented with Amazon Q Developer for GitHub, testing its ability to transform code from one language to another. While Amazon Q Developer shows promise, my experience revealed some interesting limitations in its current preview state.
The Project: EC2 Underutilization Report Tool
My test case involved Alok Shankar's EC2 underutilization reporting tool - a clever Bash script that identifies idle EC2 instances to reduce AWS costs. The original script:
- Collects 7-day average CPU usage from CloudWatch
- Gathers memory metrics when CloudWatch Agent is configured
- Captures EC2 metadata (ID, type, Name tag)
- Generates downsizing recommendations
- Sends HTML email reports with CSV attachments
This tool represented an ideal candidate for transformation - a useful utility written in Bash that could benefit from Python's improved maintainability, error handling, and testability.
My Experience with Amazon Q Developer
After forking the repository to my GitHub account, I created Issue #1 with detailed requirements for transforming the script to Python. My prompt was comprehensive, requesting:
- Complete rewrite in Python for better reliability
- Preservation of output format
- Addition of pytest unit tests
- Enhanced metrics collection beyond CPU
- More actionable cost-saving recommendations
- Adherence to Python best practices
I then added the "Amazon Q transform agent" label to engage the AI assistant.
Unexpected Results
What happened next was surprising. Instead of addressing my Python transformation request:
- Amazon Q Developer immediately responded: "I'm getting ready to upgrade your code to Java 17"
- It attempted to run a GitHub Actions workflow for a Java/Maven project
- When this failed, it requested I configure a Java workflow configuration
- The entire context of my transformation request was seemingly ignored
Amazon Q Developer: Key Limitations and Lessons
The Transform agent: Surprisingly, despite being labeled as a general "transform agent," Amazon Q Developer appears primarily designed for Java upgrades. The label "Amazon Q transform agent" should be updated to clearly indicate "Amazon Q Java transform agent" to avoid confusion.
Takeaways
The concept remains promising - automated code transformations via GitHub issues could dramatically improve developer productivity.