tips, sharing,

Configure AmazonQ & CodeWhisperer AWS AI tools for Software Engineer

Donald Donald Follow May 12, 2024 ¡ 5 mins read
Configure AmazonQ & CodeWhisperer AWS AI tools for Software Engineer
Share this

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)

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

walking JetBrain - Editor Tool

walking

Configure your AWS Account on AWS Toolkit

Open AWS Toolkit on the left menu of Visual Code

walking

You can see the AWS Get-Started UI

walking

On AWS Q + CodeWhisperer, you click on Processed to Browser

walking

Click on Open,

walking

Your browser will REQUIRE login your AWS account, and redirect to this site. Then click on Confirm and Continue button

walking

You have to configure AWS Builder ID, in case you never configure AWS Builder ID before.

walking

Input Multi-verification Code will be sent to your email

walking

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:

walking

Then, we can see your AWS Toolkit

walking

Now, we get Started to use Amazon Q and Amazon CodeWhisperer

walking

On JetBrain, we also open AWS Toolkits on the left menu of Jetbrain

walking

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

walking

Click on Sign-in Get Started on CodeWhisperer

walking

You click on Processed to Browser.

Navigate to web browser,

walking

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

walking

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

walking

Amazon Whisperer

On Authenticate with AWS Toolkit, we click on Use For Free with AWS Builder ID

walking

walking

Using your BuilderID to login

walking

walking

Generate the example code

walking

Reference

Join Newsletter
Get the latest news right in your inbox. We never spam!
Donald
Written by Donald
Hi, I am Donald (Doai Tran), the author of Testing4Everyone. I hope you like it!