1 Answer
- Newest
- Most votes
- Most comments
1
Hi
I think you can add another permission on the policy to recheck if the issue persists again.
{
"Sid": "IAM1",
"Effect": "Allow",
"Action": [ "iam:PassRole","iam:GetRole" ],
"Resource": [ "arn:aws:iam:::role/Pentest-EC2-Role" ],
"Condition": { "StringEquals": { "iam:PassedToService": "ec2.amazonaws.com" },
"StringLike": { "iam:AssociatedResourceARN": [ "arn:aws:ec2:us-west-2::instance/" ] } }
}
Check the EC2 trusted policy is there and its correct.
Test the Policies: You can use AWS IAM simulator to check if the policy permissions are okay https://policysim.aws.amazon.com/home/index.jsp?#
Relevant content
- Accepted Answerasked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
Thanks you! I need to take away the condition from policy! And works)