Why does applying a condition to ec2:DescribeInstances in an IAM policy fail?
问题 When trying to configure which instances can be listed using policies, I remark the following issue: When the condition is not implemented, all instances are visible. When any condition is implemented, nothing is visible. The example policy with condition is included: { "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt1461235889000", "Effect": "Allow", "Action": [ "ec2:DescribeInstances" ], "Resource": [ "*" ], "Condition": { "StringEquals": { "ec2:InstanceType": "r3.xlarge" } } } ] }