Why is AWS CodeDeploy giving me an AccessDeniedException from an account with administrator privileges

amazon-web-servicesaws-clideployment

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?

Best Answer

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

Related Topic