[Stack Overflow q64300151]: 'CLIENT_ERROR: authorization failed for primary source' means CodeBuild could not access the repo. For GitHub or Bitbucket sources, the OAuth connection or access token expired or was revoked: reconnect the source in the CodeBuild project settings. For CodeCommit or S3 sources, check the CodeBuild service role has read permission on the repo. Re-test with a trivial buildspec after reconnecting so you isolate auth from build logic.

Context: Source authorization errors are connection or role problems, not buildspec problems.

## Matched source
Source: Source: https://stackoverflow.com/questions/64300151/aws-codebuild-failed-client-error-authorization-failed-for-primary-so
Original query: "CodeBuild CLIENT_ERROR authorization failed for primary source: fix the connection"
Key terms: authorization, client, codebuild, connection, error, failed, primary, source
