exam questions

Exam AWS-SysOps All Questions

View all questions & answers for the AWS-SysOps exam

Exam AWS-SysOps topic 1 question 565 discussion

Exam question from Amazon's AWS-SysOps
Question #: 565
Topic #: 1
[All AWS-SysOps Questions]

A company has configured a library of IAM roles that grant access to various AWS resources. Each employee has an AWS IAM user, some of which have the permission to launch Amazon EC2 instances. The SysOps Administrator has attached the following policy to those users:

What would be the result of this policy?

  • A. Users are able to switch only to a role name that begins with ג€InfraTeamג€ followed by any other combination of characters.
  • B. Users with the role of InfraTeamLinux are able to launch an EC2 instance and attach that role to it.
  • C. ג€InfraTeamג€ role is being passed to a user who has full EC2 access.
  • D. EC2 instances that are launched by these users have full AWS permissions.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Moon
Highly Voted 2 years, 7 months ago
I would go with A. the policy basically allowing the user to Pass the role "role/InfraTeam*" to the EC2 that they are creating! So, the EC2 are able to perform any actions that the role "role/infraTeam*" can do (which is passed to it by the user)! Therefore, the user are able THROUGH the EC2 that he/she create so switch his role, from being "EC2:*" -full access -, to be roles written into "role/InfraTeam*" policy, and that could be launching DynamoDB, Lambda....etc. https://docs.amazonaws.cn/en_us/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html
upvoted 13 times
ANS0908431
2 years, 6 months ago
I agree with what you said 'So, the EC2 are able to perform any actions that the role ''role/infraTeam*" can do'. So, Why not D?
upvoted 1 times
...
karmaah
2 years, 6 months ago
I agree.
upvoted 1 times
...
...
dkp
Highly Voted 2 years, 7 months ago
Ans is A
upvoted 7 times
...
albert_kuo
Most Recent 9 months, 4 weeks ago
Selected Answer: B
iam:PassRole: This privilege is required to pass an IAM role to another AWS service. Without this privilege, you won't be able to use the "aws iam passrole" command.
upvoted 1 times
...
antthomas
2 years, 3 months ago
Selected Answer: B
B. Users with the role of InfraTeamLinux are able to launch an EC2 instance and attach that role to it. Seemcorrect as InfraTeam* are able to launch the EC2 instance
upvoted 1 times
...
einn
2 years, 5 months ago
Should be A: By giving a role or user the iam:PassRole permission, you are is saying "this entity (principal) is allowed to assign AWS roles to resources and services in this account".
upvoted 1 times
...
random_007
2 years, 5 months ago
This is good explanation https://blog.rowanudell.com/iam-passrole-explained/ A seems correct
upvoted 1 times
...
Drey
2 years, 5 months ago
It's B. A is talking about AssumeRole not PassRole. C and D are quite invalid. https://www.reddit.com/r/aws/comments/jyf4c4/difference_between_iam_passrole_vs_assumerole/
upvoted 1 times
...
abhishek_m_86
2 years, 6 months ago
B. Users with the role of InfraTeamLinux are able to launch an EC2 instance and attach that role to it. Seemcorrect as InfraTeam* are able to launch the EC2 instance
upvoted 1 times
...
ImranR
2 years, 6 months ago
A is correct...
upvoted 1 times
...
gretch
2 years, 6 months ago
not sure about B InfraTeamLinux?
upvoted 1 times
Shakai
2 years, 6 months ago
InfraTeamLinux also included in the role/infraTeam* that mentioned in the question.. And B definitely is the correct answer, user with that policy which is in 1st statement can do full EC2 permissions include launch EC2, and 2nd statement stated that user passes / associate the role/infraTeam* to it (the instances), that can perform only the actions that are permitted by whatever is defined in the role InfraTeam*.
upvoted 1 times
...
...
Kt45
2 years, 6 months ago
B roles can be passed not switched.
upvoted 2 times
...
kinetic1g
2 years, 6 months ago
B. Users with the role of InfraTeamLinux are able to launch an EC2 instance and attach that role to it.
upvoted 1 times
...
dennismp
2 years, 6 months ago
I take C back, it is B !! https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html ..Thanks Wsh!
upvoted 1 times
...
dennismp
2 years, 6 months ago
C is the ans, user has PassRole on Infrateam as well as his Ec2 full right!
upvoted 1 times
...
tetural
2 years, 6 months ago
I would choose B, https://aws.amazon.com/blogs/security/granting-permission-to-launch-ec2-instances-with-iam-roles-passrole-permission/
upvoted 1 times
jaribu
2 years, 6 months ago
Your link seems to bolster A as the correct answer. It delves into wildcards (*).
upvoted 1 times
...
...
wshyang
2 years, 6 months ago
Why not B? https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html
upvoted 1 times
...
karmaah
2 years, 6 months ago
I concur moon comments. For additional info: PassRole is not an API action in the same way that RunInstances or ListInstanceProfiles is. Instead, it's a permission that AWS checks whenever a role ARN is passed as a parameter to an API (or the console does this on the user's behalf). It helps an administrator to control which roles can be passed by which users. In this case, it ensures that the user is allowed to attach a specific role to an Amazon EC2 instance.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago