Skip to main content

Configure Source Control with AWS CodeCommit

Learn how to set up Source Control with AWS CodeCommit.

Available on:Enterprise plan

Setup instructions

Disable git syncing

If you've enabled Git Syncing, disable it:

  • In your docker.env file, set DISABLE_GIT_SYNCING=true and VERSION_CONTROL_LOCKED=false.
  • In the Settings > Advanced tab in Retool, remove the repository URL and branch name from your Git Syncing configuration.

1. Create a new IAM Role in your AWS account

Enter a name for the user and check the Access key - Programmatic access setting.

Create AWS IAM Role

Next, select Attach existing policies directly, search for "codecommit", and select the AWSCodeCommitFullAccess policy name. This is the only permission required for this new user.

IAM Role - Access Key

Save the Access key ID and Secret access key in a secure location locally. You'll use these as environment variables in step 3.

Save access key ID and secret access key

Go to the newly created user on your IAM console. Select the Security credentials tab, scroll to HTTPS Git Credentials for AWS CodeCommit, and click Generate Credentials. Download and save these credentials in a secure location. You'll use these HTTPS credentials as environment variables in step 3.

Generate HTTPS Git credentials

2. Create a new CodeCommit repository

Go to CodeCommit on your AWS console and create a new repository for Retool syncing. You can select any region of your preference.

Add a file to this repository. The repository needs to contain at least one file to sync.

3. Configure AWS CodeCommit repository settings

Go to the Source Control settings, and select Set up AWS CodeCommit. Enter the following settings.

AWS CodeCommit RepositoryThe name of the CodeCommit repository.retool-apps
AWS CodeCommit BranchThe default branch for your CodeCommit repository.main
AWS RegionThe region of the CodeCommit
Access Key IdThe Access key ID you generated in step 1.AKIAWS3BACWHP6QW6VB2
Secret Access KeyThe Secret access key you generated in step 1.loDJlwRetoolTYXOFbO
HTTPS UsernameThe HTTPS username you generated in step 1.retool-https-username
HTTPS PasswordThe HTTPS password you generated in step 1.retool-https-password
Configure AWS CodeCommit settings on Retool

4. Verify your settings

After you set up your environment variables, visit the Settings > Source Control on your Retool instance.

If your environment is correctly configured, the page will show a Deployment Dashboard. Click Test connection under the AWS CodeCommit section to test your connection and confirm the sync works as expected.

Deployment Dashboard

If you don't see the Deployment Dashboard and your AWS CodeCommit commits, go back to step 3 and confirm your environment variables are correctly set.

You are now ready to use source control with AWS CodeCommit. Read the source control getting started guide to learn more about source control workflows.