Amazon's CodeGuru is out: AI tool checks code and suggests changes to save you money

AWS releases the AI code and app analysis tool its teams have been using to reduce computing infrastructure costs.
Written by Liam Tung, Contributing Writer

Amazon Web Services (AWS) has announced general availability of its machine-learning tool CodeGuru, which helps developers streamline applications and improve the quality of their code.  

The service consists of Amazon CodeGuru Reviewer, a bug scanner run during code review, and CodeGuru Profiler, a tool that identifies lines of code in production applications and helps spot the causes of CPU over-utilization. 

AWS launched CodeGuru in preview last December as a way for customers to automate the code review process, find bugs and suggest approaches to remediate them, hopefully before they ship to users.

SEE: Multicloud: A cheat sheet (TechRepublic)

AWS is offering a 90-day free trial of CodeGuru and after that it charges $0.50 to run CodeGuru Reviewer over each 100 lines of code in a source-code repository. Users can scan every source-code pull request and from that point onwards the service only scans changed lines of code. 

CodeGuru Profiler pricing is based on the total number of sampling hours, charged at $0.005 per hour. 

The tools could be useful for developers who run applications from AWS compute instances and may face higher costs than necessary because the application's code isn't efficiently using CPU resources. 

CodeGuru reviewer relies on machine-learning models that have been trained on over 10,000 open-source projects on GitHub, as well on Amazon's own code reviews. 

Developers commit their code as usual to GitHub or another repository, and then add Amazon CodeGuru Reviewer as one of the code reviewers. It opens a pull request to vet the code. AWS says it will identify bugs and critical issues with a high degree of accuracy. 

It also provides a pull-request dashboard with information about the status of the code review, number of lines of code analyzed, and the number of recommendations. Users can then approve or reject the recommendations. 

Amazon says its internal teams have used Amazon CodeGuru Profiler on over 30,000 production applications, helping save it tens of millions of dollars in compute resources. Amazon's Consumer Payments team has also used it to streamline operations and boost application performance for Prime Day. 

A nifty feature is that the profile includes an estimate of the cost of inefficiencies found in a production application, along with recommendations for how to improve performance and reduce costs. 

SEE: From the cloud to space: AWS launches aerospace and satellite business unit

The new service is available in US East (North Virginia), US East (Ohio), US West (Oregon), EU (Ireland), EU (London), EU (Frankfurt), EU (Stockholm), Asia Pacific (Singapore), Asia Pacific (Sydney), and Asia Pacific (Tokyo). AWS plans to announce availability in more regions in the coming months.

"Our customers develop and run a lot of applications that include millions and millions of lines of code," said Swami Sivasubramanian, vice president of Amazon Machine Learning at AWS

"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. Today, the methods for identifying code quality issues are time-consuming, manual, and error-prone, especially at scale."

Software-management company Atlassian, an early user of CodeGuru, says it's been able to cut investigation times from days to hours when it runs into a problem with its applications. 

"When we detect anomalies in production, we have been able to reduce the investigation time from days to hours and sometimes minutes thanks to Amazon CodeGuru's continuous profiling feature," said Zak Islam, Atlassian's head of engineering at its Tech Teams unit. 

"Our developers now focus more of their energy on delivering differentiated capabilities and less time investigating problems in our production environment."

Editorial standards