You launch an Amazon EC2 instance without an assigned AVVS identity and Access Management (IAM) role.
Later, you decide that the instance should be running with an IAM role. Which action must you take in order to
have a running Amazon EC2 instance with an IAM role assigned to it?
A.
Create an image of the instance, and register the image with an IAM role assigned and an Amazon EBS
volume mapping.
B.
Create a new IAM role with the same permissions as an existing IAM role, and assign it to the running
instance.
C.
Create an image of the instance, add a new IAM role with the same permissions as the desired IAM role,
and deregister the image with the new role assigned.
D.
Create an image of the instance, and use this image to launch a new instance with the desired IAM role
assigned.
Explanation:
http://docs.aws.amazon.com/IAM/latest/UserGuide/roles-usingrole- ec2instance.html
B
http://www.aiotestking.com/amazon/which-action-must-you-take-in-order-to-have-a-running-amazon-ec2-instance-with-an-iam-role-assigned-to-it/
D
wrong. sorry mani
D. It is now possible to attach a role on a running instance but since the exam questions are outdated you should launch a new instance with a new role attached to it.
“B is wrong b/c the question is expected to have the wrong answer of D on the test” said no one ever
I agree that B is unnecessary to create a new role but it is possible to complete the task that way. Probably this question will not appear on any exam.
Since there is no option to just assign the desired role, option D makes the most sense.