How to allow a role to attach role to an instance?

0

How do I allow a role to attach role to an EC2 instance without having Administrator Access?? Below is my IAM policy. Something appears to be missing.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:List*",
"iam:Get*",
"iam:CreateRole",
"iam:CreatePolicy",
"iam:PutRolepolicy",
"iam:CreateServiceLinkedRole",
"iam:AttachRolePolicy",
"iam:CreateInstanceProfile",
"iam:AddRoleToInstanceProfile",
"iam:PassRole",
"sts:AssumeRole"
],
"Resource": [
"arn:aws:iam:::role/service-role/",
"arn:aws:iam:::policy/service-role/"
]
}
]
}

질문됨 3년 전412회 조회
1개 답변
0

I figured it out. The ARNs were not being called out correctly:

"arn:aws:iam:::role/NameOfRole",
"arn:aws:iam:::policy/NameOfPolicy"

답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠