hands-on lab

Automating Code Reviews with Amazon CodeGuru

Difficulty: Beginner
Duration: Up to 1 hour
Students: 1,949
Rating: 3.3/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Warning: This lab simulates the use of Amazon CodeGuru due to the cost of CodeGuru Reviewer making it prohibitive for users to associate new repositories with CodeGuru.

Amazon CodeGuru is a machine-learning-powered solution for automating performance reviews and improving application performance. It does by acting both on your code repositories and actual applications, and it currently supports Java code.

When you submit a pull request to a CodeGuru-associated code repository, such as Amazon CodeCommit, CodeGuru will peruse the changes in the pull request and make recommendations based on its own analysis of millions of lines of external code, as comments on your file changes. Additionally, if you deploy CodeGuru as an agent in your application, over time it will make observations and recommendations to help you find and fix code issues such as performance leaks, wasted CPU cycles and more.

In this lab, you'll associate an Amazon CodeCommit repository with CodeGuru and create a pull request to be analyzed.

Note: AWS closed access to the AWS CodeCommit service to new customers on the 25th of July 2024. This AWS CodeCommit lab is functional and may be useful to students expecting to work with existing AWS CodeCommit repositories.

Learning Objectives 

Upon completion of this lab you will be able to:

  • Be familiar with the basics of Amazon CodeGuru
  • Use CodeGuru to analyze code in a repository

Intended Audience

This lab is intended for:

  • Developers
  • DevOps engineers

Prerequisites

You should be familiar with:

  • Familiarity with the AWS console is helpful but not required

Updates

October 28th, 2024 - Resolved an issue preventing the lab from provisioning successfully

June 6th, 2023 - Updated instructions to improve clarity

October 12th, 2022 - Updated the lab to simulate the use of CodeGuru; student users no longer have permission to associate repositories with CodeGuru

May 19th, 2022 - Updated the instructions to reflect a specific CodeGuru Reviewer comment in the pull request

April 4th, 2022 - Updated the instructions and screenshots to reflect the latest UI

Environment before

Environment after

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Associating Amazon CodeGuru with a CodeCommit Repository
Triggering an Amazon CodeGuru Review
Viewing Amazon CodeGuru Comments