Troubleshooting AWS Amplify GitHub Repository Reconnection After Ownership Transfer

Use this when AWS Amplify cannot reconnect to a GitHub repository after an ownership transfer or redirect change.

Quick Read

  • Symptom: Use this when AWS Amplify cannot reconnect to a GitHub repository after an ownership transfer or redirect change.
  • Check first: Confirm the affected version, account context, network path, and whether the failing operation is interactive, scheduled, or automated.
  • Risk: Review before running

Symptoms

AWS Amplify fails to reconnect to a GitHub repository after ownership transfer, resulting in a 'Moved Permanently' error.

Environment

AWS Amplify, GitHub

Most Likely Causes

The ownership transfer of the GitHub repository may lead to permission issues or changes in the repository URL that AWS Amplify cannot automatically resolve.

What to Check First

  1. Confirm the affected version, account context, network path, and whether the failing operation is interactive, scheduled, or automated.
  2. Capture the exact error code, timestamp, request ID, and the smallest repeatable action that reproduces the issue.
  3. Check credentials, permissions, proxy settings, dependency versions, and local cache state before changing global configuration.

Fix Steps

  1. Verify GitHub Repository Ownership

    Ensure that the AWS account used for Amplify has access to the newly transferred GitHub repository.

    Safe to run: read-only

    Log in to GitHub.
    Navigate to the repository in question.
    Check the repository settings to confirm your AWS account is listed as a collaborator or owner.
  2. Update Repository URL in AWS Amplify

    If the repository URL has changed due to the ownership transfer, update it in the AWS Amplify console.

    Safe to run: read-only

    Log in to the AWS Management Console.
    Navigate to the AWS Amplify service.
    Select the application linked to the GitHub repository.
    Go to the 'Settings' tab.
    Click on 'Edit' next to the repository information.
    Update the repository URL if necessary and save the changes.
  3. Reauthorize GitHub Access in AWS Amplify

    Reauthorize the connection between AWS Amplify and GitHub to ensure proper permissions.

    Safe to run: read-only

    In the AWS Amplify console, select the application.
    Go to the 'Settings' tab.
    Under 'Source control', click 'Disconnect' to remove the current GitHub connection.
    Click 'Connect repository' and select GitHub.
    Follow the prompts to reauthorize AWS Amplify's access to your GitHub account.
  4. Check for Webhook Configuration

    Ensure that the webhook for the GitHub repository is correctly configured to trigger builds in AWS Amplify.

    Safe to run: read-only

    In the GitHub repository, go to 'Settings'.
    Select 'Webhooks' from the sidebar.
    Verify that the webhook URL points to AWS Amplify and is active.
    If the webhook is missing or inactive, recreate it using the URL provided by AWS Amplify.
  5. Test Connection and Build

    After making the necessary changes, test the connection and initiate a build to verify functionality.

    Safe to run: read-only

    In the AWS Amplify console, select the application.
    Click on 'Redeploy this version' to trigger a new build.
    Monitor the build logs for any errors related to the GitHub connection.

Validation

  • The original failing workflow completes in the same user and network context.
  • Logs for the same timestamp stop showing the previous authentication, permission, dependency, or connectivity error.
  • A clean retry after cache or service restart confirms the fix was not only a stale session artifact.

Logs to Check

  • Application logs for the failing workflow.
  • Client or CLI verbose output captured during the failed and successful retry.
  • Identity, proxy, repository, database, or platform service logs depending on the affected component.

Rollback and Escalation

  • Record original configuration, permissions, credentials, package sources, or connection strings before changing them.
  • Remove temporary test accounts, tokens, package sources, or broad permissions after validation.
  • Revert dependency, client, or configuration changes if the original workflow still fails.

Escalate When

  • Escalate if the same error persists after rollback and a clean retry from the original failing path.
  • Escalate if logs show authorization, data loss, certificate, replication, or production availability risk outside the local service owner scope.

Edge Cases

  • If the repository is private, ensure that the AWS Amplify service role has the necessary permissions to access the repository.
  • If the problem persists, check for any GitHub organization policies that may restrict access to third-party applications.

Notes from the Field

  • A platform error is often a boundary problem between identity, network path, and local client state. Prove which boundary failed.
  • Avoid solving a narrow user issue by making broad tenant, repository, or database permission changes.