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

asked 9 months ago242 views
2 Answers
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
EXPERT
answered 9 months ago
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

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions