AWS Certified Security - Specialty Practice Questions

AWS Certified Security - Specialty (SCS-C03) exam preparation

AWS Certified Security - Specialty practice questions in English: 180 questions with explanations. The mock exam has 65 questions and 170 minutes.

AWS Certified Security - Specialty free question 6 / 10 · Domain 4: Identity and Access Management

You want developers to be able to pass only approved roles that do not have high privileges to Lambda. Which way of building the iam:PassRole statement matches the official description?

  1. Allow only iam:GetRole, and do not allow iam:PassRole, so they can check the role details
  2. Limit the Resource of iam:PassRole to the ARNs or name prefixes of approved roles
  3. Set iam:PassedToService to lambda.amazonaws.com, and Resource can stay *
  4. Tag the roles as approved, and limit PassRole to tagged roles with the aws:ResourceTag condition
Show the answer and explanation

Answer: B

Why this is correct
A role ARN is passed as a parameter to an API operation that uses the role to grant permissions to a service, and the service checks whether the caller has iam:PassRole. To let people pass only approved roles, you scope the Resource element of the iam:PassRole statement. For example, you can use a name prefix wildcard such as role/RDS-. Tagging roles and scoping with a ResourceTag condition is not used, because the results are unreliable.

Why the other options are wrong
"Tag the roles as approved, and limit PassRole to tagged roles with the aws:ResourceTag condition" … The documentation says not to control who can pass roles by tagging roles and using the ResourceTag condition key in an iam:PassRole statement, because the results are unreliable.
"Set iam:PassedToService to lambda.amazonaws.com, and Resource can stay " … Limiting the target service still lets a high-privilege role be passed. You need to make sure the role being passed does not have more permissions than you want the user to have.
"Allow only iam:GetRole, and do not allow iam:PassRole, so they can check the role details" … Passing a role to a service requires the iam:PassRole permission. iam:GetRole is the permission you often add alongside iam:PassRole so that the role's details can be retrieved.

Key point
You can specify the target service with the iam:PassedToService condition key. Make sure the permissions of the role a user passes do not exceed the range you want to allow that user. For example, even a user who is not allowed S3 operations could have the service operate on S3 for them if they can pass a role that allows S3 operations.

Go to the AWS Certified Security - Specialty practice app (10 free questions; purchase unlocks all questions)

See the full practice set