Amazon Web Services (AWS) has made generally available a tool dubbed Amazon CodeGuru that employs machine learning algorithms to recommend ways to improve code quality and identify which lines of code are the most expensive to run on its cloud service.
Peder Ulander, director of open source for AWS, said Amazon CodeGuru not only helps improve performance and resource utilization but also reduces the time and effort spent optimizing applications before and after they are deployed.
Amazon CodeGuru is based on a set of AWS machine learning algorithms to identify best practices for deploying code. It creates a profile of the code deployed and then surfaces recommendations to improve performance and reduce costs by employing the most appropriate tier of the cloud service.
That latter capability is critical because developers don’t always factor costs into deciding which tier of a cloud service to employ. Amazon CodeGuru enables IT teams to proactively optimize their cloud usage, noted Ulander.
Amazon CodeGuru can pull code from either GitHub or CodeCommit repositories, with support for other repositories planned. It requires developers to insert agent software developed by AWS into their code. Once a pull request is made, Amazon CodeGuru automatically starts evaluating the code using trained artificial intelligence (AI) models developed using data gathered from thousands of different open source software projects by AWS and its parent company.
Once the analysis is completed, Amazon CodeGuru will generate a graph showing such metrics as latency issues and CPU utilization rates, as well as human-readable recommendations to surface specific issues and remediations that include example code and links to relevant documentation for any line of code. Amazon CodeGuru can observe application runtimes and profile application code every five minutes.
Amazon CodeGuru has two core components. Amazon CodeGuru Reviewer automatically flags common issues that deviate from best practices and provides recommendations to fix them, including example code and links to relevant documentation. It then opens a pull request and automatically starts evaluating the code using machine learning models to identify the line of code, specific issue and recommended remediation, and provides access to a pull request dashboard that lists all the information gathered by all code reviews.
IT teams can provide feedback on CodeGuru Reviewer recommendations by clicking on a thumbs up or thumbs down icon, which helps improve recommendations over time using machine learning.
The second component is Amazon CodeGuru Profiler, which identifies the most expensive lines of code by analyzing the runtime behavior of their applications. Armed with those insights, IT teams can identify and remove code inefficiencies, improve performance and decrease compute costs.
IT teams today spend an inordinate amount of time debugging code to address a broad range of issues. The paradox is the more applications they deploy, the more time they spend debugging. Perhaps the time has come to finally let machines discover code issues in the hopes that developers will use their time writing new code, not fixing it.