I made Codestar Bitbucket connection, and I'm able to select it as a source provider for Codepipeline. I can't select it as a source provider for Codebuild job for some reason.
I've added "codestar-connections:UseConnection" permission to Codebuild service role and tried GitHub connections which was selectable as source provider by both services.