CodePipeline error using Codestar connection as Source: Cannot read properties of undefined (reading 'OwnerId')

0

I´m getting this error "Cannot read properties of undefined (reading 'OwnerId')" when trying to setup GitHub as the Source repository for CodePipeline (using CodeStar Connections)

Enter image description here

The connection looks good in CodeStar.

Am I missing something here? Thanks a lot

Enter image description here

profile pictureAWS
asked 3 days ago52 views
2 Answers
1

The error you're encountering suggests there might be an issue with permissions or the configuration of your CodeStar connection. Here are a few things to check and try:

  1. Ensure you have the necessary permissions to use the CodeStar connection. You may need to add the "codeconnections:UseConnection" permission to your IAM role or user policy. This permission is required to use connections in CodePipeline.

  2. Verify that the CodePipeline service role has the correct permissions. It should have a policy that allows the "codeconnections:UseConnection" action on the specific connection resource you're trying to use.

  3. Double-check that you're using the correct resource ARN for the connection. The ARN should start with "arn:aws:codeconnections:" rather than "arn:aws:codestar-connections:".

  4. If you're the one who set up the connection, make sure you have the appropriate permissions on the GitHub side. You need to be either an organization owner or have admin permissions for the repository you're trying to connect to.

  5. Try deleting and recreating the connection in CodeStar. Sometimes, this can resolve issues with connections that aren't working as expected.

  6. Ensure that your GitHub account is properly authenticated and that the OAuth token (if you're using one) hasn't expired.

If none of these steps resolve the issue, you may want to check the CloudTrail logs for any access denied errors related to your CodePipeline role. This can provide more detailed information about what's causing the problem.

Remember that when using GitHub as a source with CodeStar connections, you don't need to provide a GitHub token in your pipeline configuration. The connection handles the authentication for you.
Sources
CodePipeline Service Role Insufficient Permission for CodeStar Connections | AWS re:Post
Troubleshooting connections - Developer Tools console
Availability of GitHub Source Action Version 2 in AWS CodePipeline by Region? | AWS re:Post
Troubleshooting CodePipeline - AWS CodePipeline

profile picture
answered 3 days ago
profile pictureAWS
EXPERT
reviewed 3 days ago
0

It was missing the "Install a new app" step of the AWS Connector for GitHub, it worked fine after installing it. Documentation here

Enter image description here

profile pictureAWS
answered 3 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