Set up Source Control with AWS CodeCommit
Learn how to implement Source Control with AWS CodeCommit for self-hosted Retool.
Source Control with AWS CodeCommit is available on Retool on-premise deployments of Self-hosted Retool v2.102 or later.
Disable git syncing
If you've enabled Git Syncing, disable it:
- In your
- 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.
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.
Save the Access key ID and Secret access key in a secure location locally. You'll use these as environment variables in step 3.
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.
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.
README.md file to this repository. The repository needs to contain at least one file to sync.
3. Set up environment variables on your Retool instance
Set the following environment variables on your Retool instance on the
|Variable name||Description||Example value|
|CODE_COMMIT_AWS_ACCESS_KEY_ID||The Access key ID you generated in step 1.||AKIAWS3BACWHP6QW6VB2|
|CODE_COMMIT_AWS_SECRET_ACCESS_KEY||The Secret access key you generated in step 1.||loDJlwRetoolTYXOFbO|
|CODE_COMMIT_AWS_DEFAULT_REGION||The region of the CodeCommit repository.||us-east-1|
|CODE_COMMIT_REPOSITORY_NAME||The name of the CodeCommit repository.||retool-apps|
|CODE_COMMIT_MAIN_BRANCH||The default branch for your CodeCommit repository.||main|
|CODE_COMMIT_HTTPS_USERNAME||The HTTPS username you generated in step 1.||retool-https-username|
|CODE_COMMIT_HTTPS_PASSWORD||The HTTPS password you generated in step 1.||retool-https-password|
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.
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.
Updated 18 days ago