☁️ Cloud Learning Hub —Books, Workshops, Video Courses and more
Do not pay the full price for your cloud learning resources. Get up to 35% OFF on resources.towardsaws.com. The store will keep growing as we add more resources from industry experts over time.
Hey Builders, welcome to the new episode of The Cloud Handbook.
It’s been quite busy in life and I couldn’t deliver the past two weeks— you know life happens sometimes.
But we are back.
In this week’s episode, I am sharing the ultimate guide to Amazon Q Developer. I have been using it for quite some time.
Let’s get started.
Introduction
As we have seen the rise of generative AI, almost every part of human life has been affected by it in some way. Mostly in software engineering, we have seen people adopting these AI tools so quickly. It’s helping engineers to ship fast, build fast, find bugs, write codes and so on.
Among a few, one of the tools I have been using at work is Amazon Q Developer. In this post, I wanted to share some of the cool capabilities of it.
Amazon Q Developer
Amazon Q Developer is an AI assistant. It assists in your software development. It can help you with many things in your daily life as a software developer.
What Q can do:
Answer questions about AWS
Answer questions about general programming concepts
Explain what a line of code or code function does
Write unit tests and code
Debug and fix code
Refactor code
Amazon Q Developer in IDE
Q Developer is available as an extension to your favorite IDEs. I use VSCode as a secondary editor. (NeoVim is primary ;))
When installed, you will get a dedicated tab in VSCode where you can chat with Q about any software development and AWS questions.
It is available in the following IDEs (as of now):
VS Code
Visual Studio
JetBrains IDE
Command Line (macOS only for now)
Special Commands
/dev
Get code suggestions across files in your current project. It allows you to explain the desired features/changes in natural language. You can view and modify the plan before generating the actual code change.
For example in the following screenshot, I have asked Q to write me a lambda function in my CDK project, to get all the items in the DynamoDB table.
It is not perfect and might need some changes but you can always review and modify before you insert the code into the project.
/transform
It is used to transform your code. For example, use it to upgrade Java code versions.
/help
View chat topics and commands.
/clear
Clear the conversation.
Q Developer is also capable of doing the following task
It can explain the selected code for you
It can optimize the code
Debug your code
Amazon Q Developer in CLI
Q is also available in the command line. Previously it was called CodeWhisper. You can download it from here and the installation process is straightforward.
When enabled in your favorite CLI tool through the dashboard, you are good to go.
Now, you might be asking, what can you do in the command line? What are the features right?
There are a couple of features I like.
Chat with Q
If you are a terminal wizard, now you have access to a powerful AI through your favorite CLI terminal. In this case, I am using iterm2.
Natural language translation to commands
Using q translate or q ai, you can translate your natural language input to commands if you don’t know or forget the particular commands.
Command completion
Another useful feature is it helps you auto-complete commands or show options.
Here are important commands:
$ q chat #chat with Amazon Q
$ q translate #Natural language to shell translation
$ q doctor #Debug installation issues
$ q quit #Quit Amzon Q in CLI
$ q help # for help
Conclusion
Although Amazon Q is in very early, this may not provide accurate information. It doesn’t mean you should not be using it. I have been using it as my coding pair, and it helping me in so many ways. It will keep improving over time.
Thanks for reading. I would also love to hear how are you leveraging other AI tools in your daily life. Let me know in the comment below.
See you next week!