Amazon’s CodeGuru technology aims to improve code quality by scanning for critical issues, identifying bugs and recommending how developers should rectify them.
Today (30 June), Amazon Web Services (AWS) announced the general availability of Amazon CodeGuru, a developer tool powered by machine learning that provides intelligent recommendations with the aim of improving code quality.
The technology scans for critical issues, identifies bugs and recommends how to remediate them. CodeGuru also can also identify an application’s most expensive lines of code, along with specific visualisations and recommendations on how to improve code to save money.
Amazon said that CodeGuru can now be enabled with a few clicks through the AWS console and that customers only pay for their “actual use” of the technology.
Swami Sivasubramanian, vice-president of Amazon machine learning at AWS, said: “Our customers develop and run a lot of applications that include millions and millions of lines of code. Ensuring the quality and efficiency of that code is incredibly important, as bugs and inefficiencies in even a few lines of code can be very costly.”
Supporting code reviews
The CodeGuru product helps organisations to perform code reviews, checking the logic, syntax and style before new code is added to an existing application code base.
Amazon said that even for large organisations, it can be challenging to have enough experienced developers with enough free time to do code reviews, given the amount of code that is written every day. Experienced reviewers can still miss problems before they impact customer-facing applications, resulting in bugs or performance issues.
“Typically, developers monitor application performance through logging, which allows them to observe how much time an application takes to complete a task,” the company added.
“However, logging is cumbersome to implement, negatively impacts application performance and doesn’t measure other metrics like CPU utilisation that contribute to compute costs, leaving developers without a tool to effectively identify cost-saving opportunities for applications in production.”
CodeGuru sets out to solve these problems by using machine learning to automate code reviews during application development, as well as the profiling of applications in production.
CodeGuru has two components: Code Reviewer and Application Profiler. Developers can use the Reviewer to automatically flag common issues that deviate from best practices, while also providing specific recommendations on how to fix them, including example code and links to relevant documentation.
For code reviews, developers commit the code as usual to their repository of choice, such as GitHub or Bitbucket Cloud, before adding Amazon CodeGuru Reviewer as one of the code reviewers, with no other changes to the normal development process.
Developers can use the machine learning-powered Amazon CodeGuru Profiler to identify the most expensive lines of code in terms of potential estimated dollar savings, by helping them understand the runtime behaviour of their applications, including serverless applications running on AWS Lambda or AWS Fargate.
Amazon’s internal teams have used CodeGuru Profiler on more than 30,000 production applications, which the company said has resulted in tens of millions of dollars in savings on compute and infrastructure costs.