Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service Role ARN blank in CodeDeploy

I am trying to setup the CodeDeploy service with one of my ec2 instances. On the form to do this, everything works properly until I reach the "Service Role" section.

This field does not display any possible ARNs.

This is what I see:

img

I created an IAM user and gave them Admin privileges and pasted their ARN into this field and got the error message

Cannot assume role provided.

Does anyone know the reason this is happening?

like image 277
chackerian Avatar asked Dec 14 '22 05:12

chackerian


1 Answers

I had to add "codedeploy.amazonaws.com" to the Role Trust Relationships:

    {
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": [
          "codedeploy.amazonaws.com",
          "ec2.amazonaws.com"
        ]
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
like image 78
Rami Jaamour Avatar answered Jan 15 '23 19:01

Rami Jaamour