A CodePipeline source action using AWS CodeConnections succeeds after its output changes from ZIP to full clone, but CodeBuild now fails during source download with a connection authorization error. The connection is available, and the pipeline role can use it; which least-privilege change preserves Git history access?
Show the answer
Correct answerB. Grant the CodeBuild service role codeconnections:UseConnection on the source connection
AWhy not this: CodeCommit Git permissions do not authorize cloning an external repository through AWS CodeConnections.
BWhy this is right: Full-clone consumption requires the CodeBuild service role to use the connection; scoping to its ARN limits access.
CWhy not this: GetConnection reads connection metadata but does not authorize using the connection to clone a repository.
DWhy not this: The pipeline role already has access, and its permissions do not transfer to the CodeBuild service role.
With full-clone output, CodeBuild needs permission to use the connection to retrieve the repository and its Git history. Permission on the pipeline role alone is insufficient; GetConnection only permits reading connection details.