You're planning to allow an Administrator to set up an EC2 Instance.
The EC2 Instance will host an application that would need access to a DynamoDB table.
Which of the following policy permissions is required to ensure that this implementation can be carried out securely? Choose 2 answers from the options given below.
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - A and D.
This is mentioned in the AWS Documentation.
Options B and C are incorrect because the trust policy is used with AWS services to assume a role and the IAM permission policy is used with the user to pass a role.
For more information on IAM roles and pass roles, please refer to the below URL-
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.htmlTo allow an Administrator to set up an EC2 instance that hosts an application that needs access to a DynamoDB table, the following two policies need to be created:
A trust policy that allows the EC2 instance to assume a role: This policy ensures that the EC2 instance can assume a role that has access to the DynamoDB table. When the EC2 instance assumes the role, it can then access the DynamoDB table using the permissions assigned to the role.
An IAM permission policy that allows the role to access the DynamoDB table: This policy grants the role the necessary permissions to access the DynamoDB table. The permissions must be scoped to only allow the actions required by the application and not more.
Now, let's examine the answer options:
A. A trust policy that allows the EC2 instance to assume a role. This is correct. The trust policy must allow the EC2 instance to assume a role with access to the DynamoDB table.
B. A trust policy that allows the user to assume a role. This is not relevant to the scenario as an EC2 instance is being used, not a user.
C. An IAM permission policy that allows the user to assume a role. This is not relevant to the scenario as an EC2 instance is being used, not a user.
D. An IAM permission policy that allows the user to pass a role. This is not relevant to the scenario as the EC2 instance will be assuming the role, not a user.
Therefore, the correct answers are A. A trust policy that allows the EC2 instance to assume a role and D. An IAM permission policy that allows the role to access the DynamoDB table.