Question : You have created a role which is common for HR and Finance dept, called HRFinance. And you started ec2 instance with this role. Now after few days you have decided to seperate it out both this role and created to role separately e.g. HRRole and FinanceRole. You first delete the HRFinance role, and tries to apply both the role to running instance. Select the correct statement for this scenerio
1. You can only associate two IAM role with an EC2 instance at this time, so applying these two roles are fine 2. All the HR and Finance application which were part of HRFinance will be denied access immediately 3. Access Mostly Uused Products by 50000+ Subscribers 4. 1 and 2 5. 2 and 3
Explanation: Can I associate more than one IAM role to an EC2 instance? No. You can only associate one IAM role with an EC2 instance at this time.
What happens if I delete an IAM role that is associated with a running EC2 instance? Any application running on that instance that's using the role will be denied access immediately.
Question : Which of the following items are required to allow an application deployed on an EC 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 1. Create an IAM User that allows write access to the DynamoDB table. 2. Add an IAM Role to a running EC2 instance. 3. Access Mostly Uused Products by 50000+ Subscribers 4. Launch an EC2 Instance with the IAM Role included in the launch configuration. 5. Create an IAM Role that allows write access to the DynamoDB table. 6. Launch an EC2 Instance with the IAM User included in the launch configuration. 1. 1,2 2. 3,4 3. Access Mostly Uused Products by 50000+ Subscribers 4. 5,6 5. 1,6
Explanation: You can not attach role to running EC2 instance, hence option 3 is out. We shoud always use IAM Role with EC2 isntance , hence option 4 is correct. And it should be able to write in DynamoDB, hence option 5 is also correct.
Q: Can I change the IAM role on a running EC2 instance? No, at this time you cannot change the IAM role on a running EC2 instance. You can change the permissions on the IAM role associated with a running instance, and the updated permissions will take effect almost immediately. Q: Can I associate an IAM role with an already running EC2 instance? No. You can associate only one IAM role with an EC2 instance.
Question : You are working as a developer in AcmeShell INC, and you have to launch ec instance to host a web application, now you also wish to launch ec2 instance with IAM role then which of the following permission you need
Explanation: An IAM user must be granted two distinct permissions to successfully launch EC2 instances with roles: Permission to launch EC2 instances. Permission to associate an IAM role with EC2 instances.