Even though I have created just a role specific to codepipeline and code build I am getting this error. Whatever I do I am unable to get rid of it. Anyone know how to resolve this?
Could not update the service role policy. The following message contains details on the exception: The policy is attached to 0 entities but it must be attached to a single role
Sign in to the AWS Management Console and open the CodePipeline console at http://console.aws.amazon.com/codesuite/codepipeline/home . Choose Create pipeline and complete the Step 1: Choose pipeline settings page in the pipeline creation wizard. After you create a pipeline, you cannot change its name.
In CodePipeline, the primary resource is a pipeline. In a policy, you use an Amazon Resource Name (ARN) to identify the resource that the policy applies to. CodePipeline supports other resources that can be used with the primary resource, such as stages, actions, and custom actions.
I am not authorized to perform an action in CodePipeline If the AWS Management Console tells you that you're not authorized to perform an action, you must contact your administrator for assistance. Your administrator is the person who provided you with your user name and password.
This is happening because the the checkbox for "Allow AWS CodeBuild to modify this service role so it can be used with this build project" is selected from the edit page, and the generated policy is not attached to the role that is selected in the "Service role" field.
When you check the box for "Allow AWS CodeBuild to modify this service role so it can be used with this build project", CodeBuild creates a policy of format "CodeBuildBasePolicy-project-name-region". If this policy is created already(previous builds), it must be attached to the service role that CodeBuild is using so that CodeBuild will be able to modify it accordingly.
In my case I had previous policy that was already unused. When I deleted it, the problem was solved.
Follow these steps:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With