Iam role created but it is not showing in the drop down menu of Modify IAM role[REQUIRED BY CODE DEPLOY]

1

i want to allow code deploy to use ec2 instance for that i have created a role from iam as shown in the picture below . the problem is that this is shown in IAM dashboard but when i want modify iam role for ec2 istance this role is not showing in drop down .the picture showing this is also attached below . Please help me in troubleshooting this problem i have searched on the web but i am not able to get rid of this problem. i am trying to learn aws cicd i am trying from last two days but i am not able to acheive the desired result.

  • I got the exact same problem. created an IAM Role for codedeploy but not visible in dropdown

已提问 9 个月前272 查看次数
2 回答
0

Afraid there is no pictures attached.. Usually if a role doesnt appear, its because of the trust policy doesnt support the resource you are trying to assign the role too.

Update the role trust policy for the resource i.e. ec2 :-

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "ec2.amazonaws.com"
            },
            "Action": "sts:AssumeRole"
        }
    ]
}
profile picture
专家
已回答 9 个月前
0

image of trust policy From iam dashboard I created a role for code deploy the trust policy is attached in the picture . When I am trying to modify iam role for the ec2 instance the created role is not available there

已回答 9 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则