Configure AmazonQ & CodeWhisperer AWS AI tools for Software Engineer
đšď¸Summary
In this post, I would like to summary and share with you the essential steps to take advantages of Amazon AI tools - Amazon CodeWhisperer for daily works of a Software Engineer.
Software Engineer usually use the well-know Editor tool such as: IntelliJ, Pycharm of JetBrain, or Visual Studio Code, ⌠Then, On this note page, I will take them as the example tools, when I apply to use CodeWhisperer.
Table of Content
đ Amazon Q
https://aws.amazon.com/blogs/aws/introducing-amazon-q-a-new-generative-ai-powered-assistant-preview/
Amazon Q - AI Assistance Chat tool.
You can use Amazon Q to have conversations, solve problems, generate content, gain insights, and take action by connecting to your companyâs information repositories, code, data, and enterprise systems. Amazon Q provides immediate, relevant information and advice to employees to streamline tasks, accelerate decision-making and problem-solving, and help spark creativity and innovation at work.
đ CodeWhispere ?
What is Amazon CodeWhisperer
Amazon CodeWhisperer is one of tools from AWS, that they provide machine learning-powered code generator that provides you with code recommendations in real time.
As you write code, CodeWhisperer automatically generates suggestions based on your existing code and comments. Your personalized recommendations can vary in size and scope, ranging from a single line comment to fully formed functions.
In oder to get more information from official document from Amazon CodeWhisperer: https://docs.aws.amazon.com/codewhisperer/latest/userguide/what-is-cwspr.html
Suggested Code for these programming languages: https://docs.aws.amazon.com/codewhisperer/latest/userguide/language-ide-support.html
- Java
- Python
- JavaScript
- TypeScript
- C#
- Go
- PHP
- Rust
- Kotlin
- SQL
The Infrastructure as Code (IaC) languages with the most support are:
- JSON (AWS CloudFormation)
- YAML (AWS CloudFormation)
- HCL (Terraform)
- CDK (Typescript, Python)
CodeWhisperer also supports code generation for:
- Ruby
- C++
- C
- Shell
- Scala
Amazon CodeWhisperer provides us 2 options:
- Personal Purpose / Individual Tier CodeWhisperer
- Enterprise Purpose for an Organization (Company) - Code Whisperer Professional
Pricing - CodeWhisperer
https://docs.aws.amazon.com/codewhisperer/latest/userguide/billing.html
đ Configuration CodeWhisperer
As tutorial post, this post will be mentioned with Personal purpose configuration steps for initializing setup CodeWhisperer Vs Code and JetBrains with AWS Builder ID login.
Prerequisite
Probably, You need to have an AWS Account to use Amazon CodeWhisperer. In cases, you are working on your company and use AWS account that your company provided you. You have to align with your manager and request to enable Code Whisperer on your account.
In order to sign-up an AWS account, you can refer to this site and follow the on-boarding steps to have an AWS account: https://aws.amazon.com/resources/create-account/
And you sign-in your AWS Account on your default browser application on your computer via this link: Link To Sign-in AWS Account
This step is deeply important to sign-in your AWS Account via AWS BuilderID for AWS Toolkit
Configure AWS plugin / extension
We need to install AWS Toolkit plugin or Extension on your Editor Code (Visual Code and JetBrain)
- Visual Code: https://code.visualstudio.com/
- Jetrain: IntelliJ, PyCharm: https://www.jetbrains.com/idea/
AWS ToolKit for Visual Code: https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.aws-toolkit-vscode
AWS ToolKit for JetBrain InteljI: https://aws.amazon.com/intellij/
Visual Code
JetBrain - Editor Tool
Configure your AWS Account on AWS Toolkit
Open AWS Toolkit on the left menu of Visual Code
You can see the AWS Get-Started UI
On AWS Q + CodeWhisperer, you click on Processed to Browser
Click on Open,
Your browser will REQUIRE login your AWS account, and redirect to this site. Then click on Confirm and Continue button
You have to configure AWS Builder ID, in case you never configure AWS Builder ID before.
Input Multi-verification Code will be sent to your email
You will input the password for creating a new AWS Builder
and see the Confirm popup, confirm and you can see the successful message such as:
Then, we can see your AWS Toolkit
Now, we get Started to use Amazon Q and Amazon CodeWhisperer
On JetBrain, we also open AWS Toolkits on the left menu of Jetbrain
You can see the AWS Get-Started UI on your JetBrain Editor Tool
If you are going to use AWS SSO and configured in your company. You can follow these steps
Click on Sign-in Get Started on CodeWhisperer
You click on Processed to Browser.
Navigate to web browser,
And Confirm to login SSO successfully, it will redirect to AWS Console.
To use personal account, on AWS Toolkit you navigate to Explorer tab
And you can see the AWS Tookit UI looks like UI on Visual Code
Then, you can see the same steps on ToolKit of Visual Code, we can setup AWS Builder account and login AWS Builder, by click on Authentication button or ReAuthentication (I logged in when I were composing this post)
Using Amazon Q, Click on Chat with Q to use Amazon Q chatbot
Amazon Whisperer
On Authenticate with AWS Toolkit, we click on Use For Free with AWS Builder ID
Using your BuilderID to login
Generate the example code
Reference
- CodeWhisperer article: https://aws.amazon.com/blogs/aws/amazon-codewhisperer-free-for-individual-use-is-now-generally-available/
- Amazon CodeWhisperer coding in Python with VS Code: https://dev.to/aws-heroes/amazon-codewhisperer-for-data-science-and-analytics-get-started-with-generative-ai-on-aws-part-2-5e66
- AWS- CodeWhisperer Workshop: