Which of the following items are required to allow an application deployed on an EC2
instance to write data to a DynamoDB table? Assume that no security Keys are allowed to
be stored on the EC2 instance. Choose 2 answers
A.
Create an IAM User that allows write access to the DynamoDB table.
B.
Launch an EC2 Instance with the IAM User included in the launch configuration.
C.
Create an IAM Role that allows write access to the DynamoDB table.
D.
Launch an EC2 Instance with the IAM Role included in the launch configuration.
E.
Add an IAM Role to a running EC2 instance.
F.
Add an IAM User to a running EC2 Instance.
C&E
You cannot add role to running EC2 instance
MK you need to pay more attention to classes buddy. Roles can be added on fly now. Read the docs again.
I have the same idea. CD
CD
C and D
CD
CD
C,D.
IAM Role is to control the access between different AWS services.
E is not correct, if one EC2 instance is running, you can’t re-assign IAM role to it.
C & E
c & E
https://aws.amazon.com/iam/faqs/
Q: Can I associate an IAM role with an already running EC2 instance?
Yes. You can assign a role to an EC2 instance that is already running. To learn how to assign a role to an already running instance, see IAM Roles for Amazon EC2.
C E
Please refer to http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html for explanation
I have an idea, why not log into the console, make an instance and try it. I did and you can definitely add or change a IAM role to a running instance. Under Actions > Instance Settings > Attach/Replace IAM Role
Adding Role to the Running Instance -> recent announcement by AWS
Duh. This is obviously C & E.
Q: Can I change the IAM role on a running EC2 instance?
Yes. Although a role is usually assigned to an EC2 instance when you launch it, a role can also be assigned to an EC2 instance that is already running. To learn how to assign a role to a running instance, see IAM Roles for Amazon EC2. You can also change the permissions on the IAM role associated with a running instance, and the updated permissions take effect almost immediately.
Q: Can I associate an IAM role with an already running EC2 instance?
Yes. You can assign a role to an EC2 instance that is already running. To learn how to assign a role to an already running instance, see IAM Roles for Amazon EC2.