CodeBuild failed due to "authorization failed for primary source and source version"

0

Hi,

We are using AWS CodeBuild to build the app and deploy it in the ECS service. However, we're encountering a random error when starting the CodeBuild process:

“” Waiting for DOWNLOAD_SOURCE authorization failed for primary source and source version testing_demo
 “”

After reconnecting the repository by editing the CodeBuild project, it works fine for a while. But then, the same error occurs again.

We have connected with Bitbucket using OAuth for CodeBuild, and I have verified the connection in my Bitbucket account, which was successful. Additionally, IAM permissions for the CodeBuild project are correct

Any advice on this issue?

asked 16 days ago120 views
1 Answer
0

Check OAuth Tokens: Ensure that the OAuth token used to authenticate CodeBuild with Bitbucket is still valid and hasn't been revoked or expired. OAuth tokens can expire, leading to authorization failures. Renewing or generating a new token might resolve the issue.

Reconnect the Repository: Since reconnecting the repository temporarily resolves the issue, this suggests there might be intermittent issues with the OAuth connection. Try reconnecting the repository again and monitor if the problem persists. If it does, there might be a deeper issue with the OAuth integration.

Network and Access Issues: Sometimes, network issues or temporary service disruptions can cause this error. Ensure there are no ongoing issues with AWS services (check the AWS Service Health Dashboard) or connectivity problems between AWS and Bitbucket.

Contact AWS Support: If the issue remains unresolved despite all these steps, consider contacting AWS Support. They can provide more detailed insights into what might be causing the authentication issues, especially since they have access to backend logs and configurations that you might not be able to see.

profile picture
EXPERT
answered 16 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions