Amazon CodeWhisperer X Amazon Q

In the recent AWS Reinvent, AWS announced that Amazon CodeWhisperer will support Amazon Q a Generative AI based chatbot

Published Dec 27, 2023

Amazon Q

Amazon Q is a tailormade AI assistant for your businesses, all you need to do is connect your company's data, information and policies to Q and Q will process the data and reply to you based on the data you've connected.
  • Q is aware of the systems the employees can access so, that they can ask nuanced questions and get tailored info they are authorized to see.
  • Apart from your business data, Q is well trained on AWS services this will make you to know more about the AWS services and how to optimize them for your businesses.
  • Right now, Q is well integrated with Amazon QuickSight, Amazon Connect and AWS SupplyChain for sure this list will expand in later months.

Amazon CodeWhisperer

  • CodeWhisperer is a ML powered Coding Assistant which was launched last year, It is designed to improve the developer productivity and it also works with all the popular IDE.
  • CodeWhisperer can flag and filter code suggestions that resembles the publicly available code with the associated repo URL and license.
  • Code whisperer understands the code patterns and generates similar code that the developer could write, even the comments you’re writing will also be auto completed.
  • Now you can customize Whisperer based on your organization's policies, standards and architectural patterns this is currently in preview mode.
  • Now CodeWhisperer can help you in Infrastructure as a Code this is currently in preview mode.

CodeWhisperer X Q in VS Code

AWS Toolkit on Visual Studio Code
AWS Toolkit on Visual Studio Code
In order to access CodeWhisperer and Q in your Visual Studio code IDE, you need to download AWS Toolkit from the extension tab and then in the home page scroll down to Amazon CodeWhisperer and click on the link you need to verify it with your AWS account I'd which you can find in the AWS console.
After that you can enter your build I'd and connect your AWS account with VS Code.
Home page of Amazon CodeWhisperer in VS code
Home page
You'll get this home page if your login is successful, you can try examples to get code suggestions and test cases.
After that enable Amazon Q also from the AWS toolkit home page.
Amazon Q in Visual Studio Code
Amazon Q
  • Now you can open any existing coding project from your computer and harness the power of Amazon Q and CodeWhisperer.
  • If you're working on thousands of lines code which was written by many and you feel difficult to understand that code means you can simply copy that particular lines of code and ask Amazon Q to explain it.
Amazon Q' s Features
Amazon Q' s Features
  • You can simply select the lines of code you want right click and you can find the options of Explain, Refactor, Fix, Optimize and Prompt.
  • If you click on Explain, Amazon Q will explain the code you've selected.
    Amazon Q explaining the code to the user
    Amazon Q explaining the code to the user
  • If you click on send to prompt option you can ask the questions you want with lines of code, for example if you want a simplified version of the code you can get that through Q.
Prompt answer from Amazon Q
Prompt answer from Amazon Q
This is how the Amazon Q powers the Amazon CodeWhisperer and we can expect lots of new features from Amazon Q and CodeWhisperer.