Please help me understand condition keys

0

Dear Experts,

I am using below post as reference. If you look at the reference, i can clearly see multiple attributes (if they are called attributes) mentioned in the condition keys column, but the poster is saying " At this time, there isn't a way to restrict "ModifyInstanceAttribute" to specific condition or resource. The action "ModifyInstanceAttribute" does not support any resource level permissions or any condition keys.

https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonec2.html "

But i can clearly see options in the condition key column. What am i missing here?

질문됨 9달 전193회 조회
2개 답변
0

Hi,

ec2:ModifyInstanceAttribute does support the conditions stated in the link you posted. Here's also an example of a valid policy using conditions

{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "VisualEditor0",
			"Effect": "Allow",
			"Action": "ec2:ModifyInstanceAttribute",
			"Resource": "arn:aws:ec2:*:111111111111:instance/*",
			"Condition": {
				"StringEqualsIfExists": {
					"aws:ResourceTag/example": "works"
				}
			}
		}
	]
}

Could you elaborate what you mean by

the poster is saying " At this time, there isn't a way to restrict "ModifyInstanceAttribute" to specific condition or resource.

profile pictureAWS
전문가
답변함 9달 전
0

I am struggling to see if this is even possible

Everything I have looked at myself, says you cant create an IAM policy that matches DeleteOnTermination value of Modifyinstanceattribute

profile picture
전문가
답변함 9달 전

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

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

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

관련 콘텐츠