Code Whisperer: The code that whispers back.

Harshal
3 min readMay 1, 2023

--

The generated code is similar to how you would write code, matching your style and naming conventions. You can quickly accept the top suggestion (tab key), view more suggestions (arrow keys), or continue writing your own code. Amazon CodeWhisperer provides artificial intelligence (AI)–powered code suggestions for multiple programming languages, including Python, Java, JavaScript, TypeScript, C#, Go, Rust, PHP, Ruby, Kotlin, C, C++, Shell scripting, SQL, and Scala. You can use the service from multiple IDEs, including JetBrains IDEs (IntelliJ IDEA, PyCharm, WebStorm, and Rider), Visual Studio (VS) Code, AWS Cloud9, and the AWS Lambda console.

I wanted to quickly set this up to see how it works. Steps to install it are pretty straightforward:

A verification code was sent to your email (be sure to check spam if you do not see the email). Enter the code and click Verify. Now you will be prompted to set a password. Enter and confirm the password and click Create AWS Builder ID.

I had to set up a few prerequisites to get the AWS CDK going:-

The AWS code whisperer icon shows up in your IDE and I am able to connect to AWS using above steps
The comments in green are what is input for CodeWhisperer and code suggestions are prompted grayed out as shown above. You can escape to ignore or tab to implement.
Asked codeWhisperer to create a S3 bucket and it spits out code in gray

Overall its pretty neat what CodeWhisperer can do. I like how it provides different forms of code for the same instruction, allowing us to choose our style of code. From what I see it can do a lot more than simple coding. I only need to test it for mostly IaC stuff versus coding and I cant wait to try out more.

--

--

Harshal
Harshal

Written by Harshal

IT enthusiast actively immersing in Multi Cloud. AWS | Microsoft Azure | Google Cloud | Oracle Cloud

No responses yet