Search code examples
amazon-web-servicesaws-code-deploy

AWS CodeDeploy "Cross-Account Pass Role Not Allowed" error


I am trying to create a CodeDeploy Deployment Group, but I don't know what to put for the "Service Role" section and I haven't found anything online that addresses this issue.

I followed Step 3: Create a Service Role for CodeDeploy - AWS CodeDeploy to include the AWSCodeDeployRole ARN but doing so gives me:

Cross-Account Pass Role Not Allowed

What's causing this error and what should be put into the "Service Role" section?


Solution

  • First create a CodeDeploy ServiceRole as described here:

    ... then you will see the role in the "Enter a service role" dropdown to select it when creating the Deployment group, or you can also paste the ARN of the role but make sure it is from the same account as your error suggests something wrong with the Role ARN format or using a Role ARN of a different account.