Find your most expensive lines of code and improve code quality
Amazon CodeGuru is a developer tool powered by machine learning that provides intelligent recommendations for improving code quality and identifying an application’s most expensive lines of code. Integrate Amazon CodeGuru into your existing software development workflow where you will experience built-in code reviews to detect and optimize the expensive lines of code to reduce costs.
Amazon CodeGuru Profiler helps developers find an application’s most expensive lines of code along with specific visualizations and recommendations on how to improve code to save money. Learn more »
Amazon CodeGuru Reviewer uses machine learning to identify critical issues and hard-to-find bugs during application development to improve code quality. Learn more »
Discover where your application is costing you money
The more efficient the code and application is, the less costly it is to run. Developers can use Amazon CodeGuru Profiler to find potential savings for any application running in production. Amazon CodeGuru Profiler provides visualizations and recommendations on how to fix performance issues and the estimated cost of running inefficient code, helping developers prioritize remediation. Optimize performance for any application running on AWS Lambda, Amazon EC2, Amazon ECS, AWS Fargate, or AWS Elastic Beanstalk, and on-premise. For EC2, Containers, and on-premise applications, attach the profiler agent to your JVM and, for Lambda Instantiate, attach the agent inside your Lambda code with a one line change.
Find costly code issues before they hit production
Trained on decades of knowledge and experience, Amazon CodeGuru Reviewer uses machine learning, best practices, and hard-learned lessons across millions of code reviews and thousands of applications profiled on open-source projects and internally at Amazon.com. For code reviews, developers commit their code to GitHub, GitHub Enterprise, Bitbucket Cloud, AWS CodeCommit and add Amazon CodeGuru Reviewer as one of the code reviewers, with no other changes to the normal development process. Amazon CodeGuru Reviewer analyzes existing code bases in the repository, identifies hard to find bugs and critical issues with high accuracy, provides intelligent suggestions on how to remediate them, and creates a baseline for successive code reviews.
Catch your most expensive line of code today
Amazon CodeGuru Profiler automatically detects anomalies in performance of critical methods in the application stack that start consuming more CPU or show increased latency. Within 10 minutes it notifies the designated developer of the anomaly. This early detection and notification prevents the escalation of the issue in production and gives the developer enough time to fix it before it impacts the availability of their service and the experience of their customers.
Amazon CodeGuru Reviewer detects deviation from best practices for using AWS APIs and SDKs, flagging common issues that can lead to production issues, such as detection of missing pagination or error handling with batch operations. It detects concurrency issues such as atomicity violations and the use of classes that are not thread-safe, which are difficult to find even for experienced programmers. It detects when resources are incorrectly closed, creating resource exhaustion and outages. It also identifies lack of input validation, where unsanitized inputs can lead to issues such as injection attacks or denial of service.
When we detect anomalies in production, we have been able to reduce the investigation time from days to hours and sometimes minutes thanks to AWS CodeGuru’s continuous profiling feature. Our developers now focus more of their energy on delivering differentiated capabilities and less time investigating problems in our production environment.
"Teams at more than 170,000 companies rely on Atlassian products to make teamwork easier, and help them organize, discuss, and complete their work. At Atlassian, many of our services have 100s of check-ins per deployment. While code reviews from our development team do a great job of preventing bugs from reaching production, it’s not always possible to predict how systems will behave under stress or manage complex data shapes, especially as we have multiple deployments per day."
Zak Islam, Head of Engineering, Tech Teams, Atlassian
We’ve found that the runtime analysis offered by the Amazon CodeGuru Profiler is one of the simplest and fastest to get running, and generates insights into the application code that are easy to remediate.
"Part of application development is the creation of performant systems as well as the feedback and continuous improvement of existing systems. This starts with a strong architectural foundation but often ends in the details of the application code. When our team at EagleDream is digging into these details there are a variety of tools at our disposal, and using both static and dynamic analysis is helpful. We’ve found that the runtime analysis offered by the Amazon CodeGuru Profiler is one of the simplest and fastest to get running, and generates insights into the application code that are easy to remediate. Using this tool we’ve been able to quickly hone in on portions of an application that represent bottlenecks that would have otherwise been difficult to spot, then develop changes that can be implemented and tested with a very fast feedback loop. This allows us to continuously deliver and improve our own workloads and the workloads of our customers, making them more performant while saving on cost at the same time."
Dustin Potter, Principal Cloud Solutions Architect, EagleDream
Amazon CodeGuru is an incredibly valuable tool that helps optimize our products’ performance while making sure that we are leveraging these services with all the best practices in place.
"At DevFactory, we manage over 600 million lines of code across over a hundred enterprise software products. A key component of our future roadmap is to turn all our products into cloud-native products that leverage the incredible array of managed services available at AWS. Rebuilding old school, on-prem architectures, and transforming them for the cloud brings a whole set of engineering challenges that range from keeping abreast with all the latest services to adjusting to the paradigm shift that is associated with these architectures. Amazon CodeGuru is an incredibly valuable tool that helps optimize our products’ performance while making sure that we are leveraging these services with all the best practices in place. Without tools like Amazon CodeGuru Reviewer, we wouldn't have been able to rewrite entire products like FogBugz to be AWS cloud-native. We are now using Amazon CodeGuru Profiler to optimize a number of products including EngineYard's container-based 'No Ops' platform and well as the next generation of the Jive collaboration platform."
Rahul Subramaniam, CEO, DevFactory
Chris Butterfield, a software development engineer who works on a scheduling service for sellers on Amazon.in:
“After running Amazon CodeGuru Profiler and seeing its recommendations, I realized that we needed to update our service to fix a bug related to CPU locking. The recommended fix worked perfectly and removed the thread contention warning which was using 55.97% of CPU time. After the fix, I completed load testing and found that a single host could now serve 700 TPS, which is around 7.5x more traffic than a single host could handle previously. We were able to reduce our number of instances by around 75% after load testing while still handling the same traffic."
Rajesh Konatham, a senior software development engineer who works on the catalog management service for Amazon.com:
“We had just disabled a few software-related configurations to improve server startup time and reduce profile clutter. We used Amazon CodeGuru Profiler to understand the impact of this change and realized that our workflow system was cloning documents each time it executed branches, even when it was not required. Because of this, we were spending 15% of CPU capacity cloning values unnecessarily. After following Amazon CodeGuru Profiler’s recommendation to remove these cloned values, we saw huge reductions in CPU utilization – a 40% reduction on the synchronous fleet and 67% reduction on the asynchronous fleet. Far more than the 15% reduction in CPU utilization we were expecting! The additional reduction was due to reduced Garbage Collection activity as the clones were no longer taking up heap memory.”
Neeraj Kumar, a senior software development engineer who works on Amazon CloudWatch:
“We ran Amazon CodeGuru Profiler and found that most of our CPU capacity was being used to sign the Amazon S3 request using SHA-2. We were using the JDK-provided implementation for SHA-2, but Amazon CodeGuru Profiler recommended that we use Amazon Corretto Crypto Provider instead. We followed the recommendation, which allowed us to implement some of these crypto algorithms more quickly. Corretto Crypto Provider matches JDK’s behavior, so onboarding was simple. After deployment we saw an approximately 30% CPU reduction in several AWS Regions."
Mike Thompson, a senior software development engineer who works on AWS builder tools:
“Amazon CodeGuru Reviewer allowed us to catch a long-standing race condition lurking in a critical piece of code. A human reviewer would have missed it as it was outside of the areas of the code I had changed. Amazon CodeGuru Reviewer provided enough context around the bug, a clear explanation on why it was bad, and an example of how to fix it. Making the required change was very easy and only required a few minutes. It was great to have something there to improve our code quality without requiring setup or getting in the way.”
Danish Bashar, a software development engineer who works on AWS DynamoDB:
“I was downloading a file from Amazon S3 and wasn’t aware that it was a stream, which created a resource leak. Unit testing would not have caught this issue because it ran fine. Since I had not explicitly written the object type I didn’t notice it, and I am pretty sure anyone code reviewing me would not have noticed it either. It took Amazon CodeGuru Reviewer a few minutes to look at the semantics of the code and it caught the resource leak relatively quickly. Amazon CodeGuru Reviewer recommended I use a try-with-resources to close the resource, and I implemented it immediately. +1.”
Geetika Vasudeo, a software development engineer who works on AWS DynamoDB:
“We were using an Amazon DynamoDB table in a way that we don’t typically use and we missed this in the code review. Amazon CodeGuru Reviewer identified that the operation was returning paginated results instead of all results. We were doing scans and only fetching results on the first page, which wasn’t a problem now, but as the table grew over time we would end up only seeing the first page and missing the rest of the results. Not handled correctly, this could have become a major bug in our code. Great catch and great recommendation.”
Amazon CodeGuru Reviewer Supports:
- Reviewer supported language: Java
- Repositories- GitHub, GitHub Enterprise, Bitbucket cloud, and AWS CodeCommit
Amazon CodeGuru Profiler Supports:
- Java and other JVM languages
- Amazon EC2, Amazon ECS, Amazon EKS, AWS Fargate, AWS Beanstalk
- Anomaly detection
- AWS Lambda
- Flame Graphs
Visit the features page.
Instantly get access to the AWS Free Tier.
Get started building with Amazon CodeGuru in the AWS Management Console.