1

I'm trying to create a deployment group in AWS from the CLI and I'm getting the following error:

An error occurred (AccessDeniedException) when calling the CreateDeploymentGroup
operation: User: <redacted> is not authorized to perform: iam:PassRole on 
resource: arn:aws:codedeploy:us-east-1:<redacted>:<redacted>

The user account I'm doing this from has the AdministratorAccess permission, so I'm stumped as to why the account isn't authorized to do this. How can I fix this?

jeltz
  • 11
  • 1
  • 3

2 Answers2

3

You need to setup "Trust relationships" so that CodeDeploy has the privelege to assume the role.

In this link start with step 8 and review your configuration.

CodeDeploy Trust relationships

John Hanley
  • 4,754
  • 1
  • 11
  • 21
0

I finally figured out what was going wrong: I wasn't properly specifying a service role. See here for how to do this. Once you create a service role with the needed permissions, you then need to get that role's ARN in order to reference it.

jeltz
  • 11
  • 1
  • 3