If you are like me, a developer who often has to balance productivity and curiosity in the workplace, then you are always on the lookout for tools that actually make life easier. So, when Amazon came up with Amazon Q Developer, a new AI-powered coding companion that can be embedded in popular IDEs like Visual Studio Code, I was more than just interested. Having used it for a week now, I can safely say it’s like having a personal coding buddy who can give you some pretty helpful tips when you need them.
But what is Amazon Q Developer, and why should anyone care? Stay tuned and find out.
What Exactly Is Amazon Q Developer?
Amazon Q Developer is not just a fancy autocompleting tool; it is a smart pair programmer who sits inside your IDE and suggests context-aware code recommendations, snippets, unit test suggestions, and even some troubleshooting tips. With the help of the advanced generative AI, Amazon has developed a simple-to-use coding assistant that is able to comprehend the context of your project.
What I liked most about Amazon Q Developer was the speed of the service and the level of understanding. It felt like the AI knew what I was planning to do before I actually did.
Features That Matter
Amazon Q Developer comes with a simple and effective design of the workplace. Here’s a list of some of the great features it has:
Intelligent Code Generation:
From a prompt or even partial comments, Amazon Q writes valid code that is relevant to your project. You will not have to look for solutions to your coding problems on Stack Overflow while in the middle of a coding spree.
Integrated Testing and Debugging
Amazon Q Developer also suggests test cases and debugging tips within your workflow. The AI comes with /test
suggestions for great unit tests for your Python and Java functions. /debug
gives very specific debugging tips that are relevant to your code problem (something that I clearly need).
Seamless Documentation
Amazon Q Developer knows the value of documentation. The /doc
command creates well-described and organized comments within your codebase, keeping your project clean and understandable so that future you (or your teammates) will know what’s going on and won’t get lost.
Effective Code Review and Refactoring
There are times when you would want to detect and correct code problems before you actually commit them. You can simply use /review
to detect and suggest a solution to the problems, or /transform
to properly rearrange your Java project from one version to the other.
Handy Cheat Sheet – Commands at Your Fingertips
Here’s a quick, practical cheat sheet of commands you’ll love:
/dev - Get implementation ready code snippets for your inputs.
/test - Unit tests can be created quickly for Python and Java.
/review - Finds and solves coding problems before committing.
/doc - Well-stated and useful documentation is generated automatically.
/transform - Smart Java project restructuring.
/help - Quick access to the complete Amazon Q documentation.
/clear - Clears the current Q session to start a new one.
Additionally, Amazon Q Developer integrates advanced features that are easily accessible within your IDE’s context menu just by clicking on the right button. Some of the options include:
Explain: This will tell you what a certain piece of code does in easy to understand terms.
Refactor: This ensures that the code is optimized such that it is easily readable and has better performance.
Fix: Suggestions for how to solve various coding problems.
Optimize: Increase the efficiency of your code.
Generate Tests: It will help you create your test cases automatically.
Send to Prompt: Get more specific with your follow up questions and enter them here.
Inline Chat: Use this to chat in real time and solve a certain problem.
How Do You Set It Up?
It’s easy – here’s an easy-to-follow guide on how to set up Amazon Q Developer in Visual Studio Code:
Install the Amazon Q Developer Extension
To do this, in VS Code, go to Extensions (Ctrl + Shift + X), then search for “Amazon Q Developer”. Install the extension, and restart/reload VSCode if required.
Authenticate with AWS
After the installation, use the Amazon Q sidebar icon to authenticate yourself using your AWS credentials through a simple OAuth flow. This includes 2 options:
1. Builder ID - Individual customers with Free Tier
Set up the Flow for the Amazon Q Developer with AWS Builder ID
- Initiate Authentication
- You will be redirected to a web browser.
- Confirm that the code displayed matches the one provided in your IDE, then click "Confirm and continue".
- Sign Up or Sign In to AWS Builder ID
- This redirects you to the AWS Builder ID sign-up or sign-in page (see image reference).
- If you’re not signed in:
- Sign up or sign in with your AWS Builder ID credentials.
- If you’re already signed in:
- The sign-up screen will be skipped automatically.
- Grant Permissions
- Allow the IDE extension to access AWS services by approving the requested permissions.
- Return to Your IDE
- Switch back to your IDE.
- You are now successfully logged into Amazon Q with your Builder ID.
- A Q Chat window should automatically open.
- Explore Additional Options
- Click on "Amazon Q" in the Status Bar (located at the bottom of your IDE).
- Access options such as:
- Pause auto-suggestions.
- Open settings
- Sign out
2. AWS IAM Identity Center - Professional customers with Pro Tier
Set up Flow for Amazon Q Developer Authentication with IAM Identity Center.
Prerequisites
- AWS Account: You must have an AWS Account with IAM Identity Center activated.
- If IAM Identity Center is not activated:
- The Account Administrator must activate IAM Identity Center in the AWS Organization for Amazon Q to work.
- Request this activation from your Account Administrator.
2.1 Set Up IAM Identity Center and Developer Pro Subscription
- Request Administrator Assistance
- Ask your Account Administrator to:
- Create an identity for yourself in the IAM Identity Center.
- Subscribe to that identity to Amazon Q Developer Pro.
- Ask your Account Administrator to:
- Key Information Needed: Ensure the Account Administrator provides:
- Start URL
- AWS Region
These can be found in the AWS Console under IAM Identity Center > Settings > Identity Source tab (listed as the AWS access portal URL).
2.2 Authenticate in Visual Studio Code
- Open Sign-In Window
- In Visual Studio Code, go to the Amazon Q extension.
- In the Sign-In window, select "Use with Pro license" and click "Continue".
- Enter Credentials
- Input the Start URL and AWS Region provided by your Account Administrator.
- Confirmation Code
- A pop-up will display a confirmation code.
- Click "Proceed to browser".
2.3 Browser Authentication
- Verify Code
- You will be redirected to a web browser.
- Confirm the code matches the one shown in Visual Studio Code, then click "Confirm and continue".
- Sign In to IAM Identity Center
- Sign in to your Identity Center profile.
- Once signed in, click "Allow access" to grant permissions.
2.4 Return to Visual Studio Code
-
Switch back to your Visual Studio Code IDE.
-
You are now successfully logged into Amazon Q with a Pro license.
-
A Q Chat window should automatically open.
Configure Your Workspace
The AI of Amazon Q Developer learns your workspace structure, so all you have to do is open your project, and the AI will take it from there. For example:
- Open your source code or a GitHub repository.
- Select code, right click, send to Amazon Q to explain the code, or open the file and ask Q to explain the code.
Begin Using Commands
The cheat sheet commands are /dev, /test, /debug, /doc, and /transform
. And you can use them in your comments or in the Amazon Q Developer chat panel. You can also use contextual AI tools by right-clicking within your code.
Conclusion
In my opinion, Amazon Q Developer is a genuine tool that actually brings value and does not act as a blocking tool for your development. It simplifies the tasks that would otherwise distract you and hinder your ability to concentrate on the actual problem-solving.
Of course, no AI tool is perfect, but the context-aware intelligence, convenience, and real productivity benefits that Amazon Q Developer brings to the table make it a tool worth integrating into your daily development workflow.
Try it out – your future self (and your codebase) will appreciate it.
References: