
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A company is implementing a new business application. The application runs on two Amazon EC2 instances and uses an Amazon S3 bucket for document storage. A solutions architect needs to ensure that the EC2 instances can access the S3 bucket.
What should the solutions architect do to meet this requirement?
A
Create an IAM role that grants access to the S3 bucket. Attach the role to the EC2 instances.
B
Create an IAM policy that grants access to the S3 bucket. Attach the policy to the EC2 instances.
C
Create an IAM group that grants access to the S3 bucket. Attach the group to the EC2 instances.
D
Create an IAM user that grants access to the S3 bucket. Attach the user account to the EC2 instances.
Explanation:
The correct answer is A because:
IAM Roles for EC2 Instances: IAM roles are specifically designed to grant AWS service permissions to EC2 instances. When you attach an IAM role to an EC2 instance, the instance automatically receives temporary security credentials that allow it to access AWS resources like S3 buckets.
Why other options are incorrect:
Best Practice: Using IAM roles with EC2 instances follows the principle of least privilege and eliminates the need to manage credentials on the instances. The role provides temporary credentials that are automatically rotated.
Implementation: The solutions architect should: