

As of November 7, 2025, you can't create new repository associations in Amazon CodeGuru Reviewer. To learn about services with capabilities similar to CodeGuru Reviewer, see [Amazon CodeGuru Reviewer availability change](https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/codeguru-reviewer-availability-change.html).

# Setting up Amazon CodeGuru Reviewer
<a name="setting-up-codeguru-reviewer"></a>

Complete the tasks in this section to set up Amazon CodeGuru Reviewer for the first time. If you already have an AWS account, know the repository that contains the source code you want reviewed, and prefer to use the defaults for IAM, skip ahead to [Getting started](getting-started-with-guru.md).

You should know the following about Amazon Web Services (AWS): 
+ When you sign up for AWS, your AWS account automatically has access to all services in AWS, including CodeGuru Reviewer. However, you are charged only for the services that you use. 
+ With CodeGuru Reviewer, you pay for the size of each of your associated repositories measured in lines of code. For more information, see [Amazon CodeGuru pricing](https://aws.amazon.com/codeguru/pricing/).
**Note**  
You can suppress recommendations from CodeGuru Reviewer, which reduces the number of lines of code analyzed and, by extension, might reduce costs. For more information, see [Suppress recommendations](recommendation-suppression.md).

**Topics**
+ [

# Sign up for AWS
](get-set-up-sign-up-for-aws.md)
+ [

# Configure IAM permissions for Amazon CodeGuru Reviewer
](get-set-up-configure-iam-permissions.md)
+ [

# Install or upgrade and then configure the AWS CLI
](get-set-up-install-cli.md)
+ [

# Create a repository for your source code
](get-set-up-setup-repository.md)

# Sign up for AWS
<a name="get-set-up-sign-up-for-aws"></a>

If you have an AWS account and have set up an administrative user already, skip to the next section, [Configure IAM permissions](get-set-up-configure-iam-permissions.md). 

If you don't have an AWS account, you can use the following procedure to create one. If you are a new Amazon CodeGuru Reviewer customer, you can sign up for a 90-day free trial. 

## Sign up for an AWS account
<a name="sign-up-for-aws"></a>

If you do not have an AWS account, complete the following steps to create one.

**To sign up for an AWS account**

1. Open [https://portal.aws.amazon.com/billing/signup](https://portal.aws.amazon.com/billing/signup).

1. Follow the online instructions.

   Part of the sign-up procedure involves receiving a phone call or text message and entering a verification code on the phone keypad.

   When you sign up for an AWS account, an *AWS account root user* is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform [tasks that require root user access](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html#root-user-tasks).

AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view your current account activity and manage your account by going to [https://aws.amazon.com/](https://aws.amazon.com/) and choosing **My Account**.

## Create a user with administrative access
<a name="create-an-admin"></a>

After you sign up for an AWS account, secure your AWS account root user, enable AWS IAM Identity Center, and create an administrative user so that you don't use the root user for everyday tasks.

**Secure your AWS account root user**

1.  Sign in to the [AWS Management Console](https://console.aws.amazon.com/) as the account owner by choosing **Root user** and entering your AWS account email address. On the next page, enter your password.

   For help signing in by using root user, see [Signing in as the root user](https://docs.aws.amazon.com/signin/latest/userguide/console-sign-in-tutorials.html#introduction-to-root-user-sign-in-tutorial) in the *AWS Sign-In User Guide*.

1. Turn on multi-factor authentication (MFA) for your root user.

   For instructions, see [Enable a virtual MFA device for your AWS account root user (console)](https://docs.aws.amazon.com/IAM/latest/UserGuide/enable-virt-mfa-for-root.html) in the *IAM User Guide*.

**Create a user with administrative access**

1. Enable IAM Identity Center.

   For instructions, see [Enabling AWS IAM Identity Center](https://docs.aws.amazon.com//singlesignon/latest/userguide/get-set-up-for-idc.html) in the *AWS IAM Identity Center User Guide*.

1. In IAM Identity Center, grant administrative access to a user.

   For a tutorial about using the IAM Identity Center directory as your identity source, see [ Configure user access with the default IAM Identity Center directory](https://docs.aws.amazon.com//singlesignon/latest/userguide/quick-start-default-idc.html) in the *AWS IAM Identity Center User Guide*.

**Sign in as the user with administrative access**
+ To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user.

  For help signing in using an IAM Identity Center user, see [Signing in to the AWS access portal](https://docs.aws.amazon.com/signin/latest/userguide/iam-id-center-sign-in-tutorial.html) in the *AWS Sign-In User Guide*.

**Assign access to additional users**

1. In IAM Identity Center, create a permission set that follows the best practice of applying least-privilege permissions.

   For instructions, see [ Create a permission set](https://docs.aws.amazon.com//singlesignon/latest/userguide/get-started-create-a-permission-set.html) in the *AWS IAM Identity Center User Guide*.

1. Assign users to a group, and then assign single sign-on access to the group.

   For instructions, see [ Add groups](https://docs.aws.amazon.com//singlesignon/latest/userguide/addgroups.html) in the *AWS IAM Identity Center User Guide*.

# Configure IAM permissions for Amazon CodeGuru Reviewer
<a name="get-set-up-configure-iam-permissions"></a>

When you create an AWS account, you get a single sign-in identity that has complete access to all of the AWS services and resources in the account. This identity is called the AWS account *root user*. Signing in to the AWS console using the email address and password that you used to create the account gives you complete access to all of the AWS resources in your account. 

We strongly recommend that you *not* use the root user for everyday tasks, even the administrative ones. Instead, create an administrative user with the least privileges needed. Then securely lock away the root user credentials and use them to perform only a few account and service management tasks. For more information, see [Security best practices in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) in the *IAM User Guide*.

See the following topics for information about permissions required for CodeGuru Reviewer and how to add them. 
+  [Authenticating with identities](auth-and-access-control.md#security_iam_authentication) 
+  [Using identity-based policies for CodeGuru Reviewer](auth-and-access-control-iam-identity-based-access-control.md) 
+  [Amazon CodeGuru Reviewer permissions reference](auth-and-access-control-permissions-reference.md) 

# Install or upgrade and then configure the AWS CLI
<a name="get-set-up-install-cli"></a>

To call Amazon CodeGuru Reviewer commands from the AWS Command Line Interface (AWS CLI) on a local development machine, you must install the AWS CLI. 

**Note**  
You cannot create a repository association for a GitHub repository using the AWS CLI. You can use the AWS CLI to create a repository association for all other supported repository types. For more information, see [Working with repository associations in Amazon CodeGuru Reviewer](working-with-repositories.md).

If you have an older version of the AWS CLI installed, we recommend you upgrade it so the CodeGuru Reviewer commands are available. To check the version, use the `aws --version` command.

**To install and configure the AWS CLI**

1. Follow the instructions in [Getting started with the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) to install or upgrade the AWS CLI.

1. To configure the AWS CLI, see [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) in the *AWS Command Line Interface User Guide*. 
**Important**  
When you configure the AWS CLI, you are prompted to specify an AWS Region. Choose one of the supported Regions listed in [Amazon CodeGuru Reviewer endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/codeguru-reviewer.html) in the *AWS General Reference*.

1. To verify the installation or upgrade, call the following command from the AWS CLI.

   ```
   aws codeguru-reviewer help
   ```

   If successful, this command displays a list of available CodeGuru Reviewer commands.

# Create a repository for your source code
<a name="get-set-up-setup-repository"></a>

Before you use Amazon CodeGuru Reviewer to create code reviews, the source code that you want to analyze must be set up in a supported repository type. CodeGuru Reviewer supports AWS CodeCommit, Bitbucket, GitHub, and GitHub Enterprise Server. If you use Bitbucket or GitHub Enterprise Server, you must also create a connection to your repository using CodeConnections. For more information, see [What are connections?](https://docs.aws.amazon.com/dtconsole/latest/userguide/welcome-connections.html) in the *AWS Developer Tools User Guide*. 

If you want to suppress recommendations from CodeGuru Reviewer, you can create and add to the root directory of your repository an `aws-codeguru-reviewer.yml` file that lists files and directories to exclude from analysis. For more information, see [Suppress recommendations](recommendation-suppression.md). 

After you know the repository type and the name of your repository, you need to create a repository association. For GitHub repositories, you can create a repository association using only the CodeGuru Reviewer console. For the other supported repository types, you can use the console, AWS CLI, or Amazon CodeGuru Reviewer SDK to create a repository association. For more information, see [Working with repository associations in Amazon CodeGuru Reviewer](working-with-repositories.md). 