

 AWS Cloud9 is no longer available to new customers. Existing customers of AWS Cloud9 can continue to use the service as normal. [Learn more](https://aws.amazon.com/blogs/devops/how-to-migrate-from-aws-cloud9-to-aws-ide-toolkits-or-aws-cloudshell/)

# Working with Amazon CodeCatalyst
<a name="ide-toolkits-cloud9"></a>



Amazon CodeCatalyst is a cloud-based collaboration space for software development teams. CodeCatalyst is a unified place to work, collaborate on code, and build, test, and deploy applications with continuous integration/delivery (CI/CD) tools. You can connect AWS resources with your projects by connecting your AWS accountsto your CodeCatalyst space. You can also use CodeCatalyst to deliver software in a quick and confident manner. For more information about CodeCatalyst, see [What is Amazon CodeCatalyst?](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment.html) in the *Amazon CodeCatalyst Guide*.

Dev Environments are cloud-based development environments that you can use in CodeCatalyst to work on the code stored in the source repositories of your project. You can create Dev Environments in CodeCatalyst. Then, while there, you can work on code in a project-specific CodeCatalyst with a supported integrated development environment (IDE). Or, create an empty Dev Environment to clone in code from a third-party repository to work on with a supported IDE.

The AWS Cloud9 IDE used to access your Dev Environment in the CodeCatalyst console is different from the AWS Cloud9 IDE that runs on AWS. In the CodeCatalyst AWS Cloud9 IDE, you're automaticallylogged into CodeCatalyst and can access the service using the **aws-explorer** option within the IDE. For more information about the AWS Toolkit, see [AWS Toolkit for AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/toolkit-welcome.html) in the *AWS Cloud9 Guide*.

**Topics**
+ [Getting started with Amazon CodeCatalyst in AWS Cloud9](ide-toolkits-cloud9-getstarted.title.md)
+ [Migrate from AWS Cloud9 to Amazon CodeCatalyst](c9-replication-cc.md)
+ [Using the replication tool](c9-replication-cc-tool.md)
+ [FAQs about the replication process](faqs-replication-tool.md)
+ [Dev Environments in Amazon CodeCatalyst](devenvironment-cloud9.title.md)

# Getting started with Amazon CodeCatalyst in AWS Cloud9
<a name="ide-toolkits-cloud9-getstarted.title"></a>

This section provides an overview of how to get started using CodeCatalyst. The topics in this section cover how to use AWS Cloud9 in Amazon CodeCatalyst and how to replicate your AWS Cloud9 environment in CodeCatalyst. Later topics also detail how to create a CodeCatalyst Dev Environment and how to access your Dev Environment using the AWS Cloud9 IDE.

AWS Toolkits are IDE-specific software development kits (SDKs) that provide quick access to AWS Cloud accounts, services, and resources. From your CodeCatalyst account in the AWS Toolkit, you can view, edit, and manage your CodeCatalyst Dev Environments, Spaces, and projects in a convenient interface. To learn more about the AWS Cloud services and features that are available through AWS Toolkits, see [What is the AWS Toolkit for Visual Studio Code?](https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/welcome.html), [AWS Toolkit for AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/toolkit-welcome.html), and [What is the AWS Toolkit for JetBrains?](https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/welcome.html).[What is the AWS Toolkit for JetBrains](https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/welcome.html) guides.

To use CodeCatalyst with the AWS Cloud9 IDE, you must have an existing Space, project and Dev Environment that you created within the CodeCatalyst console. 

**Note**  
Don't create a subfolder named **projects** within a folder of the same name within the File System of the AWS Cloud9 IDE for CodeCatalyst. If you do so, you can't access any files within this directory. This issue affects the file path **/projects/projects**. File paths such as **/test/projects **and **/projects/test/projects** aren't affected by this issue. This is a known issue and only affects the AWS Cloud9 IDE File Explorer.

**Note**  
It is not currently possible to create a subfolder named **projects** within a folder of the same name, using the File System of the AWS Cloud9 IDE for CodeCatalyst. You will not be able to access any files within this directory from the AWS Cloud9 IDE File Explorer, but you will be able access them using the command line. Please use an alternative folder name. This issue only affects the file path **/projects/projects**, file paths such as **/test/projects **and **/projects/test/projects** should work. This is a known issue and only affects the AWS Cloud9 IDE File Explorer.

# Migrate from AWS Cloud9 to Amazon CodeCatalyst
<a name="c9-replication-cc"></a>

AWS Cloud9 in CodeCatalyst provides a fully managed experience for interacting with AWS Cloud9. You can manually replicate your current AWS Cloud9 code resources in Amazon CodeCatalyst. The process is detailed in the following sections. To move your code resources and replicate them, create a Space within CodeCatalyst. A space represents your company, department, or group. You need to create spaces to add projects, members, and the associated cloud resources that you create in CodeCatalyst. When a user accepts an invitation to a project, CodeCatalyst automatically adds them to the space. Users with the **Space administrator** role can manage the space.

Within this space, you create a project and add your source repositories. A project is a collaboration space in CodeCatalyst that supports development teams and tasks. After you create a project, you can add, update, or remove resources. You can also customize your project dashboard, and monitor the progress of your team's work. You can have multiple projects within a space. The number of source repositories that you add depends on the number of repositories that you're already using in your AWS Cloud9 environment. After you create this project and added the applicable source repositories, you might need to return to your AWS Cloud9 environment and replicate the environment data to these new repositories in CodeCatalyst. What you do depends on the type of source repositories you have in AWS Cloud9.

After you create a space, project, and source repositories, you can launch your environment in CodeCatalyst using AWS Cloud9 with a Dev Environment. A Dev Environment is a cloud-based development environment. You can use a Dev Environment in CodeCatalyst to work on the code that's stored in the source repositories of your project. You can also create Dev Environments in CodeCatalyst to work on code in a project-specific Dev Environment with a supported integrated development environment (IDE).

You can also replicate your current AWS Cloud9 code resources to CodeCatalyst using the replication tool. This is a tool that you download and run in your AWS Cloud9 environment. If you already signed up to CodeCatalyst, and created a space, the tool automatically creates a project within this space and replicates your code resources to new repositories in CodeCatalyst. Similar to the manual replication process. This depends on the type of source repositories that you have in AWS Cloud9. For example, if you have GitHub repositories, you still need to replicate these repositories using the **GitHub extension** in the CodeCatalyst console.
+  [Step 1. Signing up to Amazon CodeCatalyst and creating a Space](#c9-replication-cc-space-creation) 
+  [Step 2. Creating a project in your Space](#c9-replication-cc-project-creation) 
+  [Step 3. Creating a source repository in your project](#c9-replication-cc-repo-creation) 
+  [Step 4. Replicating your AWS Cloud9 code resources to source repositories in CodeCatalyst ](#c9-replication-cc-source-repo-creation) 
+  [Step 5. Creating a Dev Environment in CodeCatalyst using AWS Cloud9](#dev-environment-creation) 

## Step 1. Signing up to Amazon CodeCatalyst and creating a Space
<a name="c9-replication-cc-space-creation"></a>

You can sign up for Amazon CodeCatalyst without an invitation to an existing space or project. When you sign up, you create a space and project. You can enter your existing AWS account ID that you used for AWS Cloud9. This same AWS account can be used for billing purposes. For information about how to find your AWS account ID, see [Your AWS account ID and its alias](https://docs.aws.amazon.com/IAM/latest/UserGuide/console_account-alias.html). Follow this procedure to sign up for your Amazon CodeCatalyst profile, create a space, and add an account for your space.

**To sign up as a new user**

1. Open the [CodeCatalyst console](https://codecatalyst.aws/).

1. On the welcome page, choose **Sign up**. 

   The **Create your AWS Builder ID** page displays. Your AWS Builder ID is an identity that you create to sign in to. This ID isn't the same as an AWS account ID. To learn more about an AWS Builder ID, see [AWS Builder ID and other AWS credentials](https://docs.aws.amazon.com/signin/latest/userguide/differences-aws_builder_id.html) in the *AWS Sign-In User Guide*.

1. For **Your email address**, enter the email address that you want to associate with CodeCatalyst. Then, choose **Next**.

1. For **Your name**, enter the first and last name that you want displayed in applications where you use your AWS Builder ID. 

   This name is your AWS Builder ID profile name. If you want, you can change the name later.

   Choose **Next**. The **Email verification** page appears. A verification code is sent to the email that you specified.

1.  For **Verification code**, enter the code that you received, and then choose **Verify**. 

   If you don't receive your code after 5 minutes and can't find it in your spam or junk folders, then choose **Resend code**.

1. After your code is verified, enter a password and choose **Confirm password**.

   Select the check box confirming that you read and acknowledge the AWS Customer Agreement and the AWS Service Terms, and then choose **Create my profile**.

1. On the **Create your alias** page, enter an alias to use for CodeCatalyst. Other CodeCatalyst users will use this alias to @mention you in comments and pull requests. Your CodeCatalyst profile will contain both your full name from your AWS Builder ID and your CodeCatalyst alias. You can't change your CodeCatalyst alias.

   Your full name and your alias will display in different areas in CodeCatalyst. For example, your profile name appears in your activity feed, but project members will use your alias to @mention you.

   Choose **Create alias**. The page updates to show the **Create your space** section.

1. For **Space name**, enter the name of your space, and then choose **Next**. 

   You can't change this name.

1. For **AWS account ID**, link the twelve-digit ID for the account that you want to connect to your space.

   In **AWS account verification token**, copy the generated token ID. The token is automatically copied for you. But, you might want to store it while you approve the AWS connection request.

1. Choose **Verify in AWS**.

1. The **Verify Amazon CodeCatalyst space** page opens in the AWS Management Console. 

   This is the **Amazon CodeCatalyst Spaces** page. You might need to log in to access the page.

   To access the page, sign in to the Amazon CodeCatalyst Spaces in the [AWS Management Console](https://console.aws.amazon.com/codecatalyst/home/).

   The verification token field in the AWS Management Console is automatically populated with the token generated in CodeCatalyst.

1. Choose **Verify space**.

   An **Account verified** success message displays to show that the account was added to the space.

   You will use CodeCatalyst free tier by default. If you want to change, choose **To enable the Standard tier or add IAM roles for this space, view space details**.

   For more information about CodeCatalyst pricing tiers, see [Amazon CodeCatalyst - Pricing](https://codecatalyst.aws/explore/pricing).

   The **CodeCatalyst space details** page opens in the AWS Management Console. This is the **Amazon CodeCatalyst Spaces** page. You might need to log in to access the page.

1. Choose **Go to [Amazon CodeCatalyst](https://codecatalyst.aws/)**.

1. On the creation page in CodeCatalyst, choose **Create space**.

   A status message displays while your space is being created. When the space is created, CodeCatalyst opens the page for your space. The view defaults to the **Projects** tab. 
**Note**  
If a permissions error or banner is shown, then refresh the page and try to view the page again.

After you sign up to CodeCatalyst and create a space, the next step in the replication process is to create a project within this space.

## Step 2. Creating a project in your Space
<a name="c9-replication-cc-project-creation"></a>

The following steps outline how to create an empty project within the space that you created in the previous step. With this project, you can manually add the resources that you want at a later time. Before you create a project you must have the *Space administrator* role, and you must join the space where you want to create the project. When you create a space, CodeCatalyst automatically assigns you the *Space administrator* role. The *Space administrator* role is the most powerful role in CodeCatalyst. For more information about this role and its permissions, see [Space administrator role](https://docs.aws.amazon.com/codecatalyst/latest/userguide/welcome.html).

**To create an empty project**

1. Navigate to the space where you want to create a project.

1. On the space dashboard, choose **Create project**.

1. Choose **Start from scratch**.

1. Under **Give a name to your project**, enter the name that you want to assign to your project. The name must be unique within your space.

1. Choose **Create project**.

After you create a project, the next step in the replication process is to create one or more source repositories.

## Step 3. Creating a source repository in your project
<a name="c9-replication-cc-repo-creation"></a>

Within the project that you just created, you need to create a source repository. This repository contains a single file, a **README.md** file, which you can edit or delete at any time. Depending on your choices that you made when you create a source repository, it might also contain a `.gitignore` file.

**To create a source repository**

1. Open the [CodeCatalyst console](https://codecatalyst.aws/).

1. Navigate to your project.

1. In the navigation pane, choose **Code**, and then choose **Source repositories**.

1. Choose **Add repository**, and then choose **Create repository**.

1. In **Repository name**, provide a name for the repository. 

   Repository names must be unique within a project. For more information about requirements for repository names, see [Quotas for source repositories in CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/source-quotas.html).

1. (Optional) In **Description**, add a description for the repository that helps other users in the project understand what the repository is used for. 

1. (Optional) Add a `.gitignore` file for the type of code that you plan to push. 

1. Choose **Create**.
**Note**  
CodeCatalyst adds a `README.md` file to your repository when you create it. CodeCatalyst also creates an initial commit for the repository in a default branch named **main**. You can edit or delete the README.md file, but you can't change or delete the default branch.

1. To get the source repository clone URL and PAT, choose **Clone repository**.

1. To copy each of the HTTPS clone URL and PAT, choose **Copy**. Then, store the clone URL and PAT somewhere where you can retrieve it.

   The clone URL and PAT will be used in the step 4, and referenced as `CODECATALYST_SOURCE_REPO_CLONE_URL` and `CODECATALYST_PAT`.

After you create a source repository within your project, replicate your AWS Cloud9 data to this source repository.

## Step 4. Replicating your AWS Cloud9 code resources to source repositories in CodeCatalyst
<a name="c9-replication-cc-source-repo-creation"></a>

The type of source repository that you have in your AWS Cloud9 environment determines the replication method that you follow to get your code resources into the CodeCatalyst source repository that you created. The options are as follows: 
+ [Using GitHub repositories in AWS Cloud9](#c9-replication-cc-source-repo-creation-github)
+ [Using non-GitHub, for example GitLab or Bitbucket, repositories in AWS Cloud9](#c9-replication-cc-source-repo-creation-nongithub)
+ [Using an empty repository in AWS Cloud9](#c9-replication-cc-source-norepo-creation). This option means you would not be using any source repository in AWS Cloud9.

### Using GitHub repositories in CodeCatalyst
<a name="c9-replication-cc-source-repo-creation-github"></a>

With the **GitHub repositories** extension, you can use linked GitHub repositories from AWS Cloud9 in Amazon CodeCatalyst projects. The following steps outline how to install the GitHub extension from the CodeCatalyst catalog. The steps also show how to connect your existing GitHub account to your CodeCatalyst space and link your GitHub repository to your CodeCatalyst project.

The first step in this method is to install the **GitHub repositories** extension from the CodeCatalyst catalog. To install the extension, perform the following steps.

**Important**  
As part of installing and configuring the **Github repositories** extension, you must install an extension into your GitHub account. To do this, you must be a GitHub account administrator and a CodeCatalyst space administrator.

**Step 1. To install an extension from the CodeCatalyst catalog**

1. Open the [CodeCatalyst console](https://codecatalyst.aws/).

1. Navigate to your space.
**Tip**  
If you belong to more than one space, you can choose which space to view in the top navigation bar.

1. Navigate to the CodeCatalyst catalog by choosing the **Catalog** icon in the top menu bar next to the search bar. You can search for **GitHub repositories** or filter extensions based on categories.

1. (Optional) To see more details about the extension, such as the permissions associated with it, choose the **GitHub repositories** extension name.

1. Choose **Install**. Review the permissions required by the extension, and if you want to continue, choose **Install** again.

After installing the **GitHub repositories** extension, you are taken to the **GitHub repositories** extension details page where you can view and manage connected GitHub accounts and linked GitHub repositories.

After you install the **GitHub repositories** extension, connect your GitHub account to your CodeCatalyst space. To connect your GitHub account, perform the following steps.

**Step 2. To connect your GitHub account to CodeCatalyst**

1. In the **Connected Github accounts** tab, choose **Connect GitHub account** to go to the external site for GitHub.

1. Sign into your GitHub account using your GitHub credentials, and then choose the account where you want to install Amazon CodeCatalyst.

1. Choose whether you want to allow CodeCatalyst to access all current and future repositories. Or, alternatively, choose the specific GitHub repository that you want to use in CodeCatalyst. The default option is all GitHub repositories in the GitHub space.

1. Review the permissions given to CodeCatalyst, and then choose **Install**.

After connecting your GitHub account to CodeCatalyst, you can view the connected account in the **GitHub accounts** tab of the **GitHub repositories** extension details page.

The final step to using your GitHub repositories in CodeCatalyst is to link the repository to the CodeCatalyst project where you want to use it. To link your GitHub repository to a CodeCatalyst project, perform the following steps outlined in Step 3 of the overall process:

**Step 3. To link a GitHub repository to a CodeCatalyst project from the GitHub repositories extension details page**

1. In the **Linked GitHub repositories** tab, choose **Link GitHub repository.**.

1. For **GitHub account**, select the GitHub account that contains the repository that you want to link.

1. For **GitHub repository**, select the repository that you want to link to a CodeCatalyst project.

1. For **CodeCatalyst project**, select the CodeCatalyst project that you want to link the GitHub repository to.

1. Choose **Link**.

Your CodeCatalyst repository should now have the updated files and commits you just pushed. You can now create Dev Environments from this branch and open them with AWS Cloud9. For detailed information on Dev Environments, see [Dev Environments in CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment.html).

You can now create Dev Environments from this branch and open them with AWS Cloud9. The steps to do this are outlined in [Step 5: Creating a Dev Environment using AWS Cloud9 in CodeCatalyst](#dev-environment-creation)

### Using non-GitHub repositories in CodeCatalyst
<a name="c9-replication-cc-source-repo-creation-nongithub"></a>

You need to create a personal access token (PAT) in Amazon CodeCatalyst before replicating your environment from AWS Cloud9 using a non-GitHub repository. The following section outlines how to create this token. 

#### Creating a personal access token in Amazon CodeCatalyst
<a name="c9-replication-cc-pat-creation"></a>

You can access the source repository that you created in your project on a local computer with a Git client or in an integrated development environment (IDE). To do this, you must enter an application-specific password. You can create a personal access token (PAT) to use for this purpose. The personal access tokens (PATs) that you create are associated with your user identity across all spaces and projects in CodeCatalyst. You can view the names and expiration dates of the PATs that you created, and you can delete thee PATs that you no longer need. You can only copy the PAT secret at the time you create it.

**To create a personal access token (PAT)**

1. Open the CodeCatalyst console at [https://codecatalyst.aws/](https://codecatalyst.aws/).

1. In the top menu bar, choose your profile badge, and then choose **My settings**. 
**Tip**  
You can also find your user profile. To do this, on the members page for a project or space, choose your name from the members list.

1. Under **Personal access tokens**, choose **Create**.

1. In **PAT name**, enter a descriptive name for your personal access token (PAT).

1. In **Expiration date**, keep the default date or choose the calendar icon to select a custom date. The expiration date defaults to 1 year from the current date.

1. Choose **Create**.
**Tip**  
You can also create this token when you choose **Clone repository** for a source repository. 

1. To copy the PAT secret choose **Copy**. Store the PAT secret somewhere where you can retrieve it.
**Important**  
The PAT secret only displays once. You can't retrieve it after you close the window. If you didn't save the PAT secret in a secure location, you can create another one.

After you create the PAT for your source repository, replicate your data from your AWS Cloud9 environment to CodeCatalyst by adding a remote repository in your AWS Cloud9 environment and pushing your data to this repository, as outlined in the section below.

#### Adding a remote repository in your AWS Cloud9 environment
<a name="c9-replication-cc-source-repo-creation-nongithub-steps"></a>

Say that you're running repositories that aren't GitHub repositories. You can add a remote repository in your AWS Cloud9 environment and push your data to your source repository in CodeCatalyst. To complete this process, run the following commands.

From within your AWS Cloud9 IDE, add a remote repository that points to the source repository that you created in step 3 of the replication process in CodeCatalyst. Replace `CODECATALYST_SOURCE_REPO_CLONE_URL` in the command with the Clone URL that you saved in the step 10 of [Step 3. Creating a source repository in your project](#c9-replication-cc-repo-creation).

```
 git remote add codecatalyst CODECATALYST_SOURCE_REPO_CLONE_URL
```

Push a new branch to the source repository by using the following command. When prompted to enter a password, use `CODECATALYST_PAT` that you stored in the step 10 of [Step 3. Creating a source repository in your project](#c9-replication-cc-repo-creation):

```
git checkout -b replication && git push codecatalyst replication
```

The following is an example of expected command run output:

```
Switched to a new branch 'replication'
Password for 'https://[aws-account-id]@[aws-region].codecatalyst.aws/v1/MySpace222581768915/Replication/Repository':
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 982 bytes | 122.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Validating objects: 100%
To https://[aws-account-id].codecatalyst.aws/v1/MySpace222581768915/Replication/Repository
* [new branch] replication → replication
```

```
```

This branch is available in the source repository that you created in CodeCatalyst. You can create Dev Environments from this branch and open them with AWS Cloud9. For more information about Dev Environments, see [Dev Environments in CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment.html).

You can now create Dev Environments from this branch and open them with AWS Cloud9. The steps to do this are outlined in [Step 5: Creating a Dev Environment using AWS Cloud9 in CodeCatalyst](#dev-environment-creation)

#### Using an empty repository in AWS Cloud9
<a name="c9-replication-cc-source-norepo-creation"></a>

First create a personal access token (PAT) in Amazon CodeCatalyst before you can replicate your environment from AWS Cloud9 using an empty repository. The following section outlines how to create this token. 

##### Creating a personal access token in Amazon CodeCatalyst
<a name="c9-replication-cc-pat-creation-empty"></a>

You can access the source repository that you created in your project on a local computer with a Git client or in an integrated development environment (IDE). To do this, you must enter an application-specific password. You can create a personal access token (PAT) to use for this purpose. The personal access tokens (PATs) that you create are associated with your user identity across all spaces and projects in CodeCatalyst. You can view the names and expiration dates of the PATs that you created, and you can delete thee PATs that you no longer need. You can only copy the PAT secret at the time you create it.

**To create a personal access token (PAT)**

1. Open the CodeCatalyst console at [https://codecatalyst.aws/](https://codecatalyst.aws/).

1. In the top menu bar, choose your profile badge, and then choose **My settings**. 
**Tip**  
You can also find your user profile. To do this, on the members page for a project or space, choose your name from the members list.

1. Under **Personal access tokens**, choose **Create**.

1. In **PAT name**, enter a descriptive name for your personal access token (PAT).

1. In **Expiration date**, keep the default date or choose the calendar icon to select a custom date. The expiration date defaults to 1 year from the current date.

1. Choose **Create**.
**Tip**  
You can also create this token when you choose **Clone repository** for a source repository. 

1. To copy the PAT secret choose **Copy**. Store the PAT secret somewhere where you can retrieve it.
**Important**  
The PAT secret only displays once. You can't retrieve it after you close the window. If you didn't save the PAT secret in a secure location, you can create another one.

After you create the PAT for your source repository, replicate your data from your AWS Cloud9 environment to CodeCatalyst by initiating an empty repository in your AWS Cloud9 environment and pointing to the source repository you created in CodeCatalyst, as outlined in the section below.

##### Initiating an empty repository in AWS Cloud9
<a name="c9-replication-cc-source-norepo-creation-steps"></a>

If you don't have any source repository that's set up in AWS Cloud9, then initiate an empty repository in AWS Cloud9. Additionally, point to the source repository that you created in CodeCatalyst, and add and push the files you want to replicate through Git. Perform the following steps and run the following commands to replicate your AWS Cloud9 files to CodeCatalyst.

1. From your AWS Cloud9 environment, initiate an empty repository by running the following command:

   ```
   git init -b main
   ```

   Then, you see a similar output as shown below:

   ```
   Initialized empty Git repository in /home/ec2-user/environment/.git/
   ```

1. Clone the source repository URL from CodeCatalyst. Navigate to the CodeCatalyst project that you created within the CodeCatalyst console, and, in the navigation pane, choose **Code**, and then choose **Source repositories**.

1. Choose the repository from the list of source repositories that you want, and choose **Clone repository** to copy the clone URL.

1. Add the CodeCatalyst repository using the URL you cloned, and push the content already in the empty repository in CodeCatalyst:

   ```
   git remote add origin [...]
   git push origin --force
   ```

1. Add the files that you want to replicate. If you want to replicate all the files in your environment directory, run `git add -A`:

   ```
   git add -A .
   git commit -m "replicate"
   ```

1. Merge the two unrelated histories. Address merge conflicts if they occur:

   ```
   git merge origin/main --allow-unrelated-histories
   ```

1. Push the changes back to the source repository in CodeCatalyst by running the following command. When prompted to enter a password, enter the personal access token (`CODECATALYST_PAT`) that you generated the step 10 of [Step 3. Creating a source repository in your project](#c9-replication-cc-repo-creation):

   ```
   Admin:~/environment (main) $ git push origin main
   Password for 'https://222581768915@git.us-west-2.codecatalyst.aws/v1/MySpace222581768915/Replication/Replication':
   ```

After completing this procedure, your CodeCatalyst repository has the updated files and commits that you just pushed. You can now create Dev Environments from this branch and open them with AWS Cloud9. The steps to do this are outlined in the section below. 

## Step 5: Creating a Dev Environment using AWS Cloud9 in CodeCatalyst
<a name="dev-environment-creation"></a>

The following procedure outlines how to create a Dev Environment in CodeCatalyst using AWS Cloud9 and the data you just replicated.

**To create a Dev Environment using AWS Cloud9**

1. Open the CodeCatalyst console at [https://codecatalyst.aws/](https://codecatalyst.aws/).

1. Navigate to the project where you want to create a Dev Environment.

1. In the navigation pane, Choose **Overview**, and then navigate to the **My Dev Environments** section.

1. Choose **Create Dev Environment**.

1. Choose AWS Cloud9 from the drop-down menu. 

1. Choose **Clone a repository**.
**Note**  
Currently, CodeCatalyst does not support cloning third-party repositories, but you can create a Dev Environment and clone a third-party repository into it from your chosen IDE. 

1. Do one of the following:

   1. Choose the repository to clone, choose **Work in existing branch**, and then choose a branch from the **Existing branch** drop-down menu.

   1. Choose the repository to clone, choose **Work in new branch**, enter a branch name into the **Branch name** field, and choose a branch off of which to create the new branch from the **Create branch from** drop-down menu.

1. Optionally, add an alias for the Dev Environment.

1. Optionally, choose the **Dev Environment configuration** edit button to edit the Dev Environment's compute, storage, or timeout configuration.

1. Choose **Create**. While your Dev Environment is being created, the Dev Environment status column will display **Starting**, and the status column will display **Running** once the Dev Environment has been created.

# Using the replication tool
<a name="c9-replication-cc-tool"></a>

AWS Cloud9 in CodeCatalyst provides a fully managed experience for interacting with AWS Cloud9. To enable customers to try using AWS Cloud9 in CodeCatalyst, we have created a replication tool. After you copy and run the script in your AWS Cloud9 environment, follow the prompts to run it and replicate your code resources from AWS Cloud9 to CodeCatalyst. For more information on the replication tool and process, see [FAQ's on the replication process](https://docs.aws.amazon.com/cloud9/latest/user-guide/faqs-replication-tool) outlined below.

**Note**  
This replication process will have no effect on your existing AWS Cloud9 environments. After the replication process is complete, you can delete the Dev Environments, source repositories, project and space, and it will have no affect on your AWS Cloud9 environment. This tool will only copy your code resources to AWS Cloud9 in CodeCatalyst, it will not delete or configure your existing AWS Cloud9 environments. This replication tool has been released to an initial select group of AWS accounts. As a result, it may not appear in certain AWS accounts.

**Note**  
It is recommended that you sign up to Amazon CodeCatalyst and create a space before you download the tool. For information about signing up to CodeCatalyst, see [Signing up to Amazon CodeCatalyst and creating a Space](c9-replication-cc.md#c9-replication-cc-space-creation).

## Benefits of using AWS Cloud9 on Amazon CodeCatalyst
<a name="cloud9-codecatalyst-benefits"></a>

The following section outlines some of the performance benefits and enhanced features you will experience when using AWS Cloud9 on CodeCatalyst:
+ CodeCatalyst provides an integrated experience that enables you to use fully managed Dev Environments to manage the entire software development life cycle from a single location.
+ Enhanced Amazon EBS volume size options at launch.
+ Support for ephemeral environments and the ability to scale compute of your Dev Environment on demand.
+ Custom AMI support that is available through the specification of custom images.
+ Devfile support that enables you to describe configurations as code.

## Replicating your AWS Cloud9 code resources in CodeCatalyst using the replication tool
<a name="c9-replication-cc-tool-steps"></a>

The following procedure details how to copy and run the replication tool to complete the replication process.

1. Copy the script below and ensure you run it within an AWS Cloud9 environment:

   ```
   curl https://dx5z5embsyrja.cloudfront.net -o /tmp/replicate-tool.tar.gz && tar --no-same-owner --no-same-permissions -xvf /tmp/replicate-tool.tar.gz -C /tmp && node /tmp/cloud9-replication-tools
   ```

1. *[Optional]* The replication tool uses your AWS account ID for telemetry. The purpose of this is to help us better identify any issues you may encounter while using the tool. We emit telemetry events for `tool starts`, `tool fails`, `tool is cancelled by user`, `tool completes successfully` and `tool creates a Dev Environment for the user`. If you want to disable telemetry with the replication tool, see [Disabling telemetry for the replication tool](#disable-telemetry) below.

1. After you copy and run the replication tool in your AWS Cloud9 environment, you will need to link your AWS account with an AWS Builder ID by navigating to the access URL in a browser and clicking *Allow* within 10 minutes. Please ensure you only open the link once, if you open it multiple times it will cause an error and you will need to start again. For more information about AWS Builder ID, see [ Sign-in with AWS Builder ID](https://docs.aws.amazon.com/signin/latest/userguide/sign-in-aws_builder_id.html) in the *AWS Sign-In User Guide*. This will grant the replication tool access to your code resources for the purpose of replicating them in CodeCatalyst.

1. Choose the Space that you want to use. If you have only one space, that space is selected. For more information about spaces, see [Spaces in CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/spaces.html) in the *Amazon CodeCatalyst User Guide*.

1. Choose if you want to replicate your code in CodeCatalyst or try it with a new Dev Environment. We recommend replicating your code directly in CodeCatalyst. For more information about Dev Environments, see [Dev Environments in CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment.html) in the *Amazon CodeCatalyst User Guide*. 

1. Enter a name for your project or press enter to use the default name provided.

1. When prompted, select how you want to copy your files to the new source repository in CodeCatalyst. You can choose to either push the root folder to a single CodeCatalyst repository, or push your sub-folders to distinct CodeCatalyst repositories.

1. After the tool is complete, navigate to the project within the CodeCatalyst console through the URL provided in the terminal message to access your code resources in CodeCatalyst.

After completing this procedure, your CodeCatalyst repository has the updated files and commits that you just pushed. You can now create Dev Environments from this branch and open them with AWS Cloud9.

## Disabling telemetry for the replication tool
<a name="disable-telemetry"></a>

The following steps outline how to set an environment variable to disable telemetry for the replication tool.

1. Open a terminal in your AWS Cloud9 environment

1. Run either of the following commands:

   ```
   export CLOUD9_REPLICATION_TOOL_TELEMETRY=off
   ```

   or

   ```
   export CLOUD9_REPLICATION_TOOL_TELEMETRY=0
   ```

1. Once you run one of the commands above, the environment variable will be set and telemetry for the replication tool will be disabled. After you have disabled telemetry you must copy and re-run the replication tool script again to begin the process.

## Replication tool feedback
<a name="troubleshooting-migration-tool"></a>

If you encounter any issues, or want to give feedback on your experience using the replication tool, please create and submit a support case. For information on creating a support case, see [Creating support cases and case management](https://docs.aws.amazon.com/awssupport/latest/user/case-management.html).

## Differences between AWS Cloud9 and Amazon CodeCatalyst
<a name="cc-differences-c9"></a>

The following table outlines some of the differences between AWS Cloud9 and AWS Cloud9 on CodeCatalyst.


| AWS Cloud9 | AWS Cloud9 on Amazon CodeCatalyst | 
| --- | --- | 
|  Private VPC works very well with AWS Cloud9.  |  The use of private VPC is currently not supported for AWS Cloud9 on CodeCatalyst.  | 
|  AWS Cloud9 supports pre-configured AWS managed credentials.  |  Credentials need to be manually configured for AWS Cloud9 on CodeCatalyst.  | 
|  It is possible to have intervals of 30 minutes to 7 days and to disable shutdowns with AWS Cloud9.  |  It is possible to have intervals of 15 minutes to 20 hours for AWS Cloud9 on CodeCatalyst and you can't disable shutdowns.  | 
|  AWS Cloud9 supports Ubuntu and AL2 OS platforms.  |  AWS Cloud9 on CodeCatalyst supports MDE Universal images and custom images which can include Ubuntu and AL2. For more information on this, see [Universal devfile images](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment-universal-image.html) in the *Amazon CodeCatalyst User Guide*.  | 
|  Uploading and downloading is supported in AWS Cloud9  |  Uploading and downloading is currently not supported for AWS Cloud9 on CodeCatalyst. Users will need to upload and download using Amazon S3 buckets.  | 
|  Collaboration is available in AWS Cloud9  |  Collaboration is currently not available for AWS Cloud9 on CodeCatalyst.  | 

# FAQs about the replication process
<a name="faqs-replication-tool"></a>

The following section aims to answer some FAQs related to the replication tool, and the replication process.

 **Question:** If I replicate my AWS Cloud9 environment on CodeCatalyst, will my AWS Cloud9 environment be impacted?

 **Answer:** No, the replication of your environment will only copy over your code resources to AWS Cloud9 in CodeCatalyst enabling you to continue working. Your code resources and environment on AWS Cloud9 will not be affected in any way.

 **Question:** If I want to rollback, will my AWS Cloud9 environment be impacted?

 **Answer:** No, you can delete the CodeCatalyst Dev Environment, source repositories, project and space and it will have no affect on your AWS Cloud9 environment.

 **Question:** Will the new location be compliant with standards like HIPAA, SOC, etc?

 **Answer:** The Dev Environment on CodeCatalyst is currently not compliant with these standards. Compliance with these standards is on the roadmap.

 **Question:** Where will my code resources go?

 **Answer:** Your code resources will be copied to source repositories within your project in CodeCatalyst.

 **Question:** Will my usage be limited?

 **Answer:** As part of the replication process you will create Dev Environments that have 16 GB within the free tier. This means you can have a maximum of 4 Dev Environments. For more information on pricing, storage and the different tiers available, see [Amazon CodeCatalyst - Pricing](https://codecatalyst.aws/explore/pricing).

 **Question:** Where will my compute go?

 **Answer:** There will be no change to your existing compute. It will remain as is.

 **Question:** Can I use my existing AWS account credentials in CodeCatalyst, and will they be automatically transferred?

 **Answer:** You can configure your AWS account credentials manually in CodeCatalyst. They will not be automatically transferred.

 **Question:** How much will this cost?

 **Answer:** You can get started using CodeCatalyst for free. For more information on pricing and the different tiers available, see [Amazon CodeCatalyst - Pricing](https://codecatalyst.aws/explore/pricing).

 **Question:** Is the data replication process and data storage in CodeCatalyst safe?

 **Answer:** Yes, we will use git push with https to copy the code resources and CodeCatalyst securely stores data within the service. All data is encrypted in transit and at rest. For more information on data protection in CodeCatalyst, see [Data protection in Amazon CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/data-protection.html) in the *Amazon CodeCatalyst User Guide*.

 **Question:** Which replication approach should I choose?

 **Answer:** The replication tool offers two approaches; you can copy your code resources from AWS Cloud9 to CodeCatalyst by pushing them to a single CodeCatalyst source repository, or each subfolder translates into a distinct CodeCatalyst source repository. We recommend using the first approach as it doesn't require prior knowledge of CodeCatalyst concepts such as source repositories. This approach is a good starting point to explore the AWS Cloud9 experience in CodeCatalyst, while working with a similar setup you are used to in AWS Cloud9.

The second option is best chosen when you are using the subfolders located under the root AWS Cloud9 environment folder independently. With this approach, any files under the root folder will not be replicated. For more information on source repositories in CodeCatalyst, see [Source repositories in CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/source.html) in the *Amazon CodeCatalyst User Guide*.

 **Question:** What is the personal access token generated in the replication process and why do I need it? Can I generate it again if I lose it?

 **Answer:** The personal access token is associated with your user identity in CodeCatalyst. It is required as a password when you push local changes with git to CodeCatalyst source repositories. For more information on the token and how to generate it, see [Managing personal access tokens in Amazon CodeCatalyst](https://docs.aws.amazon.com/codecatalyst/latest/userguide/ipa-tokens-keys.html) in the *Amazon CodeCatalyst User Guide*.

 **Question:** What happens if there is an error during the replication process?

 **Answer:** If an error occurs when using the replication tool you should first try the tool again. If the error relates to the source repositories, you can manually push your code resources to the CodeCatalyst source repositories once they have been replicated. This should work as the local repositories have already been configured to work with CodeCatalyst upstream. If an issue persists, please create and submit a support case. For information on creating a support case, see [Creating support cases and case management](https://docs.aws.amazon.com/awssupport/latest/user/case-management.html).

 **Question:** Why do I need to authenticate and give permissions to the replication tool using my AWS BuilderID?

 **Answer:** During the replication process the replication tool needs to read and write multiple resources (projects, Dev Environments, source repositories) in CodeCatalyst and copy local contents on the behalf of the user, so it requires your permission to do this.

 **Question:** Will there be a change in latency if I move to CodeCatalyst?

 **Answer:** Depending on the actions you are doing you may see a reduction in latency. This is due to the CodeCatalyst server being hosted in the PDX region.

 **Question:** Will all my installed software transfer over?

 **Answer:** No, only your code resources will be transferred. Binaries, configurations and installed software will not be transferred.

# Dev Environments in Amazon CodeCatalyst
<a name="devenvironment-cloud9.title"></a>

The following sections outline how to create and manage your Dev Environment with CodeCatalyst using the AWS Cloud9 IDE.
+ [Creating a Dev Environment](#ide-toolkits-create-cloud9)
+ [Opening Dev Environment settings](#ide-toolkits-settings-cloud9)
+ [Resuming a Dev Environment](#ide-toolkits-resume-cloud9)
+ [Deleting a Dev Environment](#ide-toolkits-delete-cloud9)
+ [Editing the repository devfile for a Dev Environment](#ide-toolkits-edit-devfile-cloud9)
+ [Cloning a repository](#ide-toolkits-clone-cloud9)
+ [Troubleshooting a Dev Environment](#cloud9-devenvironment-troubleshoot)

## Creating a Dev Environment
<a name="ide-toolkits-create-cloud9"></a>

You can create a Dev Environment in multiple ways:
+ Create a Dev Environment in CodeCatalyst with a CodeCatalyst source repository from the **Summary**, **Dev Environment**, or **Source repositories** pages.
+ Create an empty Dev Environment that's not connected to a source repository in CodeCatalyst from Dev Environments.
+ Create a Dev Environment in your IDE of choice and clone a CodeCatalyst source repository into the Dev Environment.

You can create one Dev Environment for each branch and repository. A project can have multiple repositories. Your Dev Environments are only associated with your CodeCatalyst account, and can only be managed by your CodeCatalyst account. You can open the Dev Environment and work with it with any of the supported IDEs. After you choose a specific IDE, you can only open that Dev Environment with the chosen IDE. If you want to use a different IDE, you can either change the IDE by selecting the Dev Environment in the navigation bar and choosing **Edit**, or by creating a new Dev Environment. By default, Dev Environments are created with a 2-core processor, 4 GB of RAM, and 16 GB of persistent storage. 

For more information about how to create a Dev Environment in CodeCatalyst, see [Creating a Dev Environment](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment-create.html) in the *Amazon CodeCatalyst guide*.

For information and steps on creating a Dev Environment in CodeCatalyst, see [Creating a Dev Environment](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment-create.html) in the *Amazon CodeCatalyst User Guide*.

**Note**  
You can now create Dev Environments with third-party source repositories. For information on linking a third-party source repository to a project within CodeCatalyst, see [Linking a source repository](https://docs.aws.amazon.com/codecatalyst/latest/userguide/source-repositories-link.html) in the *Amazon CodeCatalyst User Guide*.

**Important**  
Dev Environments can run scripts via devfiles that have access to your CodeCatalyst credentials. Please inspect the repository before opening untrusted resources.

## Opening Dev Environment settings
<a name="ide-toolkits-settings-cloud9"></a>

After you create a Dev Environment in the CodeCatalyst console, you can view specific Dev Environment settings:

1. In the CodeCatalyst console, navigate to your Dev Environment through the AWS Cloud9 IDE.

1. Choose **aws-explorer** from the AWS Cloud9 sidebar.

1. In the **Developer Tools** navigation pane, expand **CodeCatalyst** and choose **Open Settings** to open the **Dev Environment Settings** view.

1. From the **Dev Environment Settings** view, the following sections contain options for your Dev Environment: 
   + **Alias:** View and change the **Alias** that's assigned to your Dev Environment.
   + **Status:** View your current Dev Environment status, the project that it's been assigned to, and stop your Dev Environment.
   + **Devfile:** View the name and location of the Devfile for your Dev Environment. Open your Devfile by the choosing **Open in Editor**.
   + **Compute Settings:** Change the size and default **Timeout Length** for your Dev Environment.

**Note**  
You can't change the amount of storage space that's assigned to your Dev Environment after it's created.

**Note**  
When using Amazon CodeCatalyst AWS CLI from the terminal, you must ensure you set *AWS\$1PROFILE=codecatalyst* before running any CodeCatalyst commands.

## Resuming a Dev Environment
<a name="ide-toolkits-resume-cloud9"></a>

Everything in the `$HOME` directory of a Dev Environment is stored persistently. You can stop working in a Dev Environment if necessary, and resume working in your Dev Environment at a later time. Suppose that a Dev Environment is left idle for more than the amount of time that was selected in the **Timeout** fields when the Dev Environment was created. In this case, the session automatically stops. 

You can only resume a Dev Environment from CodeCatalyst. For more information about how to resume a Dev Environment, see [ Resuming a Dev Environment](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment-resume.html) in the *Amazon CodeCatalyst guide*.

**Note**  
Resuming a Dev Environment might take several minutes.

## Deleting a Dev Environment
<a name="ide-toolkits-delete-cloud9"></a>

When you finished working on the content that's stored in your Dev Environment, you can delete that content. Before you delete a Dev Environment, make sure you commit and push your code changes to the original source repository. After you delete your Dev Environment, compute and storage billing for the Dev Environment ends.

You can only delete a Dev Environment from the **Dev Environments** page in CodeCatalyst. For more information about how to delete a Dev Environment, see [Deleting a Dev Environment](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment-delete.html) in the *Amazon CodeCatalyst guide*.

## Editing the repository devfile for a Dev Environment
<a name="ide-toolkits-edit-devfile-cloud9"></a>

To change the configuration of a Dev Environment, edit the devfile. You can usedevfiles to standardize your development Dev Environment across your team. You can edit the devfile from the root of the source repository in CodeCatalyst. Alternatively, you can edit the devfile in a supported IDE. If you edit the devfile in a supported IDE, commit and push your changes to the source repository or create a pull request. That way, a team member can review and approve the devfile edits. 

**Note**  
You can only include public container images in your devfile.

**Note**  
If dependencies are missing, some AWS Cloud9 IDE features might not work in custom devfile. It might require additional effort to make them work on some platforms other than Linux x64. <a name="ide-toolkits-edit-devfile-cloud9-steps"></a>

**To edit the repository devfile for a Dev Environment in AWS Cloud9**

1. In the CodeCatalyst console, navigate to your Dev Environment through the AWS Cloud9 IDE.

1. From the AWS Cloud9 sidebar, choose **aws-explorer** .

1. In the **Developer Tools** navigation pane, choose the **CodeCatalyst toolkit** menu.

1. Choose **Open Devfile**.

1. Edit the devfile, and save the file.

1. Choose **Source Control**, which is the Git extension from the menu side-bar.

1. In the **Message** text field, enter a message before staging changes.

1. To prepare for a commit, choose the **Stage All Changes (\$1)** icon.

1. To view Git commands, choose the **menu** icon that's next to the repository name.

1. Choose **Commit** and **Push**.

1. Choose **Update Dev Environment** from the AWS Toolkit menu.

   Choose **Commit** and **Push**. The updated devfile has been saved and the changes have been committed and pushed.

**Note**  
Say that the Dev Environment you want to launch using a custom devfile doesn't work. This might be because the devfile isn't compatible with AWS Cloud9. To troubleshoot, review the devfile. If the issue persists, delete it and try creating a new one.

You can also edit the devfile for a Dev Environment through CodeCatalyst. For more information, see [Configuring your Dev Environment](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment-devfile.html) in the *Amazon CodeCatalyst guide*.

## Cloning a repository
<a name="ide-toolkits-clone-cloud9"></a>

To work effectively with multiple files, branches, and commits in source repositories, you can clone the source repository to your local computer. Then, use a Git client or an IDE to make changes. From CodeCatalyst, you can use the AWS Cloud9 IDE Gitextension in the same way as any other Git host provider and also by using the command line. To learn how to clone a third-party repository, see [Initialize or clone a Git repository](https://docs.aws.amazon.com/cloud9/latest/user-guide/using-gitpanel.html).

For more information about creating a Dev Environment from a source repository and cloning it with CodeCatalyst, see [Source repository concepts](https://docs.aws.amazon.com/codecatalyst/latest/userguide/source-concepts-clone.html) in the *Amazon CodeCatalyst guide*.

## Troubleshooting a Dev Environment
<a name="cloud9-devenvironment-troubleshoot"></a>

If you encounter issues with your Dev Environment, see [ Troubleshooting problems with Dev Environments](https://docs.aws.amazon.com/codecatalyst/latest/userguide/troubleshooting-devenvironments.html) in the *Amazon CodeCatalyst guide*.

**Note**  
When using Amazon CodeCatalyst AWS CLI from the terminal, you must ensure you set *AWS\$1PROFILE=codecatalyst* before running any CodeCatalyst commands.

If you encounter issues with your Dev Environment, see [ Troubleshooting problems with Dev Environments](https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironments-troubleshooting.html) in the *Amazon CodeCatalyst guide*.