A deployment role can create Lambda functions and currently has iam:PassRole on all roles. Which changes restrict role passing to roles under /lambda-app/ and only to Lambda? (Choose two.)
Choose 2 answers
Show the answer
Correct answersA. Restrict the iam:PassRole Resource to role ARNs under /lambda-app/.B. Require iam:PassedToService to equal lambda.amazonaws.com.
AWhy this is right: The Resource element in an iam:PassRole statement identifies the roles the caller may pass.
BWhy this is right: iam:PassedToService restricts the service to which the caller may pass a role.
CWhy not this: iam:AssociatedResourceArn identifies an associated resource, such as a function, rather than the passed role.
DWhy not this: aws:PrincipalArn identifies the deployment role making the request, not the role being passed.
The Resource element limits which roles can be passed, and iam:PassedToService limits the receiving service. aws:PrincipalArn identifies the caller, not the role being passed; iam:AssociatedResourceArn identifies the associated service resource.