BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News AWS Adds Coding Assistant CodeWhisperer to Lambda Console

AWS Adds Coding Assistant CodeWhisperer to Lambda Console

Bookmarks

AWS recently announced the preview of Amazon CodeWhisperer in the AWS Lambda console. Available as a native code suggestion feature in the code editor, the new functionality of the coding assistant can make code recommendations during Lambda function definition.

Currently supporting Python, Java, and JavaScript, CodeWhisperer is a machine learning-powered code generator that provides code recommendations in real time launched in preview in June. When activated in the Lambda console, it generates suggestions based on existing functions and comments. Mark Richman, senior solutions architect at AWS, explains:

When writing AWS Lambda functions in the console, CodeWhisperer analyzes the code and comments, determines which cloud services and public libraries are best suited for the specified task, and recommends a code snippet directly in the source code editor. The code recommendations provided by CodeWhisperer are based on ML models trained on a variety of data sources, including Amazon and open source code.

Source: https://aws.amazon.com/blogs/compute/introducing-amazon-codewhisperer-in-the-aws-lambda-console-in-preview

There are some differences in the user experience between the IDE toolkit extensions (JetBrains, Visual Studio Code, and AWS Cloud9) and the Lambda integration for CodeWhisperer. While the AWS toolkit extensions provide automatic suggestions and can show multiple suggestions, the Lambda console requires a manual fetch and shows a single suggestion. Werner Vogels, CTO at AWS, explains how the new technology can help developers:

When we launched Lambda, I said the only code that will be written in the future is business logic. Well, it turns out we're still not completely there, but tools like CodeWhisperer definitely help us to get on that path because you can focus on what's the unique code that you need to write for the application that you have, instead of the same code that everybody else needs to write.

There are three main functionalities for CodeWhisperer in the Lambda code editor: single-line code completion, full function generation and generating code from comments. Richman explains how the last option works:

Write a comment describing the intended functionality and, on the following line, activate the CodeWhisperer suggestions. Given the context from the comment, CodeWhisperer first suggests the function signature code in its recommendation. (...) After you accept the function signature, CodeWhisperer suggests the rest of the function code (...) When you accept the suggestion, CodeWhisperer completes the entire code block.

Ben Kehoe, cloud robotics research scientist at iRobot, tweets:

Here’s the thing about CodeWhisperer and Lambda: this is the antithesis of the future we should be working towards. If CodeWhisperer can write it for you, it’s not a differentiator but you still own the result.

Corey Quinn, cloud economist at The Duckbill Group, is instead more concerned about writing serverless functions in the console:

I'm horrified at the idea of authoring and editing a Lambda function within the console for anything that's even slightly beyond "a quick typo fix."

The integration with Lambda is currently available only in Northern Virginia. To use CodeWhisperer in the Lambda console, developers must first sign up to the preview or request access directly in the Lambda console. During the preview period, the service is free.

About the Author

Rate this Article

Adoption
Style

BT