• The new AI tool provides machine learning-powered code recommendations to help developers be more productive.
  • CodeWhisperer is available for preview in Java, JavaScript, and Python programming languages.

Amazon announced the launch of CodeWhisperer, an AI pair programming tool that can autocomplete entire functions based on just a comment or a few keystrokes, at its re: Mars conference. The tech giant trained the system, which supports Java, JavaScript and Python, on billions of lines of publicly available open-source code and its codebase, as well as publicly available documentation and code on public forums.

Developers can now utilize CodeWhisperer directly inside their chosen integrated development environments (IDEs), such as Visual Studio Code, IntelliJ IDEA, PyCharm, WebStorm, and Amazon’s AWS Cloud 9, as it is currently available in preview as part of the AWS IDE Toolkit. Support will also soon be available for the AWS Lambda Console.

Before the announcement, Amazon’s VP of its AI services, Vasi Philomin, emphasized that the firm didn’t merely develop this to provide a Copilot clone. Copilot is an AI pair programming tool developed by GitHub. Philomin pointed out that the company started laying the framework for this launch quite a few years ago with CodeGuru, its AI code reviewer and performance profiler, and DevOps Guru, its tool for discovering operation difficulties.

“I think the technology is at a point where we thought it was the right time to do it,” Philomin said. “And it fits nicely with the other pieces that they have. It’s been a journey, and we’ve just done different parts at different times.”

To keep the announcement a low-key affair, Amazon has been testing the service internally with a limited group of developers.

The algorithm continuously analyses code and comments, the company says, and even considers personal coding preferences and variable names. It will then generate its unique code snippets using this contextual information.

Not a replica of other AI pair programming tools

It’s important to note that CodeWhisperer does various tasks differently from programs like Copilot. For starters, even though most of the code that the system generates is original, whenever it produces code that is eerily similar to a portion of the training data, it will flag it and draw attention to the license of that original function. The choice of whether to use it or not is then left to the developer. This should remove some concerns about copyright that could arise by utilizing a tool like this.

Security was a further factor Philomin emphasized. CodeWhisperer will check the code for potential security flaws based on Amazon’s expertise in managing sizable codebases, doing debriefs after things go wrong, and its experience with CodeGuru.

“Security is always important in AWS, and so we want to ensure that the code we generate is secure,” Philomin said. “Now obviously, we’ve generated the code, and the developer can change it — and so CodeWhisperer has the capability to say: run a scan on the current source file. It will … scan and … tell you any issues and security vulnerabilities either in the generated or the changed code.”

Philomin emphasized that the team put a lot of effort into ensuring that the code generated by CodeWhisperer doesn’t produce any biased code. But when it occurs, the team has put filters to get rid of the code automatically.

The actual user or developer experience is really simple. Developers have a variety of code suggestions to pick from. It can autocomplete comments and will only recommend functions based on those comments.

Philomin added that though the system will work just fine for developers outside of the AWS ecosystem, the team took great care to guarantee that the system operates very well for developers who wish to use it to access AWS services.

“When we say it has first-class support for AWS API, it’s only additional stuff. In terms of all of our measurements and all of our testing, we find it works remarkably well, and it’ll be state-of-the-art,” he said.