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
the answer is D
https://forums.aws.amazon.com/message.jspa?messageID=720963
D is Correct One!!
D
D
D
D
D
D
B
http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html
Although a role is usually assigned to an EC2 instance when you launch it, a role can also be attached to an EC2 instance that is already running.
As of Feb 2017 , ‘B’ is also valid answer.
https://aws.amazon.com/blogs/security/easily-replace-or-attach-an-iam-role-to-an-existing-ec2-instance-by-using-the-ec2-console/
the answer changed. B is correct
IAM Role updated
(http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html)
Note
Although a role is usually assigned to an EC2 instance when you launch it, a role can also be attached to an EC2 instance that is already running. To learn how to attach a role to a running instance, see IAM Roles for Amazon EC2.
B might not be correct, since its mentioned “same permissions as an existing IAM role”, so questions doesn’t say to use any existing IAM role.
this is outdated , you can now assign a iam role to a running instance through the EC2 services console on aws
D is the right answer.
D is the right answer.
B is the right answer.
Check detail.
https://aws.amazon.com/blogs/security/easily-replace-or-attach-an-iam-role-to-an-existing-ec2-instance-by-using-the-ec2-console/
B. is right answer
B
The question is outdated. The current answer should be B now instead of D.