I want userA that is in guest group have a policy that allows to do everything with an EC2 instance BUT see only this instance. I don't want the user to see all my EC2 instances list.
I did:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "abc",
"Effect": "Allow",
"Action": [
"ec2:RebootInstances",
"ec2:StartInstances",
"ec2:StopInstances"
],
"Resource": "arn:aws:ec2:us-east-1:33333333333:instance/i-444444444444444"
},
{
"Sid": "abb",
"Effect": "Allow",
"Action": "ec2:DescribeInstances",
"Resource": "arn:aws:ec2:us-east-1:33333333333:instance/i-444444444444444"
}
]
}
getting an error: "The actions in your policy do not support resource-level permissions and require you to choose All resources"
Tried adding
"Condition": {
"StringEquals": {
"ec2:ResourceTag,UserName": "abc"
}
}
While my EC2 has tag key: "name" and value: "abc"
In this case getting:
This means that it is impossible to grant access to ONE EC2 instance to a user without them seeing all my EC2 machines?