
Amazon Q Guide: AI-Powered Development with Examples
Learn Amazon Q’s AI tools for coding: /dev, /test, /review, /doc, /transform. A hands-on guide for developers to enhance productivity!
Dinesh Besiahgari
Amazon Employee
Published Mar 8, 2025
Amazon Q is the most recent entry into the realm of developer tools from Amazon and serves as Amazon’s generative AI-powered assistant that is set to transform the way software is developed. Designed by the creative people of Amazon Web Services (AWS), Amazon Q is not just a tool; it is a loyal companion that increases productivity, improves code quality, and decreases project time. This AI-driven assistant is integrated seamlessly into popular development environments such as IntelliJ, Visual Studio Code, and other IDE's, and it uses advanced natural language processing and machine learning to understand the intent of developers and suggest context-aware suggestions and automation. Its capabilities extend from writing code and creating unit tests, to reviewing code for issues, generating documentation, to even rewriting legacy projects to match current standards. Amazon Q is designed to support the developer at every stage of the development life cycle, whether they are creating new features, maintaining existing systems, or upgrading to new technologies. Because of its ability to work with different programming languages and frameworks, it is a valuable tool for both beginners and professionals in the ever dynamic tech ecosystem. This article delves into the specifics of the solutions that Amazon Q offers, and how these five key commands (/dev, /test, /review, /doc, and /transform) can help developers get the most out of the tool.
The
/dev
command is one of the foundational commands in the Amazon Q and Framework, which enables you to generate code snippets or actually implement changes within your projects. It is most useful for rapid application development or quickly building new features. For instance, if you require a Python function to calculate the factorial of a number
Prompt:
/dev Generate a Python function to calculate the factorial of a number.


This feature helps save time by creating functional code that you can later use in your project and continue to develop further.
Testing is important and the Amazon Q
/test
command facilitates this process. If you have the factorial function above and you want to check if it is correct you can ask. Prompt:
/test Generate unit tests for the factorial function in Python

This yields a test suite so that you can check your code with little or no effort and is perfect for ensuring quality in rapid development workflows.
Before Committing
/review
enables you to discover and rectify issues before posting the code. For instance, you have a buggy Java method:Prompt:
/review
- When /review is selected it will ask if you need Amazon Q to look for issues in the entire workspace or the active file..
- If a review workspace is selected it will review the entire workspace. If the review active file is selected then Amazon Q will review the active file tab in the VS code and identifies the issues accordingly.


This proactive review ensures that there are cleaner commits and less time is spent in debugging.
A clear documentation is often under emphasized, but Amazon Q
/doc
command simplifies it. You can request for e.g.: This auto generated doc string improves on code readability and also helps in collaboration with the team.Prompt:
/doc
- when selected Amazon Q asks if it needs to create a new README.md or updating an existing README.md file.
- After generating the document it would ask to Accept or regenerate it.

The
/transform
is a game changer and the command facilitates large-scale project upgrades, such as migrating a Java project to a newer version. This transformation will align your project with the current Java standards and thus enhance type safety and maintainability. When I called the
/transform
command, Amazon Q started a guided upgrade process: - Source Version Identification: Amazon Q could determine the source JDK version to be 8 from the pom.xml.
- Target Version Selection: It prompted me to select the target JDK version, and I chose 17.
- Unit Test Conversion: The tool asked whether it should attempt to convert existing unit tests. I decided to skip this as there were no tests supplied in this example.
- Diff Format: It then asked whether to show changes as one big diff or many. I went with the single diff for simplicity.
- JDK 8 Path: The last step was to provide the path to JDK8. After following the instruction to run
/usr/libexec/java_home -v 1.8
in a new terminal, then enter the JAVA 8 path and Amazon Q successfully detected the path and proceeded with the transformation.
This proves how the tool is designed to adapt its process based on input and feedback, ensuring a smooth, tailored experience for users.

In Java 17, it is suggested to use generics to exclude raw types and strengthen the type safety. Moreover, Java 17 has brought var for local variable type inference though it is not necessary.
Amazon Q's capabilities, which include code generation, testing, review, documentation, and transformation, make Amazon Q a versatile tool for developers. Whether you are a sole coder or a part of a large team, this tool increases the development rate, reduces mistakes, and enforces the best practices. As the AI continues to evolve, Amazon Q is notable for providing actionable and context-oriented suggestions that are relevant to the developer’s workflow.
Want to give it a try? Begin with a small project, try these commands and see your efficiency increase. For more information, use the /help command in Amazon Q to find more details about its help resources.
References:
https://aws.amazon.com/developer/generative-ai/amazon-q
https://aws.amazon.com/q/developer/pricing/
https://aws.amazon.com/blogs/aws/amazon-q-developer-now-generally-available-includes-new-capabilities-to-reimagine-developer-experience/
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.