Aster Retail enforces an SCP that denies iam:PassRole unless the role has the tag Approved=true. ECS in multiple accounts now fails to launch tasks because it needs to pass its service-linked role, which cannot be tagged. How should the security team modify the SCP to allow ECS while keeping the guardrail?
Choose an answer
Tap an option to check your answer.
Correct answer: Update the Deny statement to exclude requests where iam:PassedToService equals ecs-tasks.amazonaws.com for iam:PassRole..
Why this is the answer
The correct solution leverages the iam:PassedToService condition key, which specifies the AWS service to which a role is being passed. By adding a condition to the Deny SCP that excludes requests where iam:PassedToService is ecs-tasks.amazonaws.com, the SCP will not block iam:PassRole actions when ECS is passing its service-linked role. This maintains the general guardrail for other roles while allowing ECS to function. Adding an explicit Allow for iam:PassRole on the ECS service-linked role ARN will not override an SCP Deny, as SCPs are evaluated before IAM policies and explicitly deny actions. Tagging service-linked roles is not possible, as they are managed by AWS. Attaching AdministratorAccess is a significant security risk and does not directly address the iam:PassRole SCP issue.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed