
Answer-first summary for fast verification
Answer: By using an IAM role with the necessary permissions.
The correct answer is C. AWS security best practices recommend using IAM roles to grant permissions to AWS resources, including S3 buckets. By attaching an IAM role to the EC2 instances, applications running on those instances can securely access the S3 bucket without needing to use access keys or credentials directly. This approach provides a more secure and manageable way to grant access to AWS resources from EC2 instances. Options A and B are not recommended as they involve using long-term credentials that are not automatically rotated and could pose a security risk if compromised. Option D, while important for security, is not directly related to granting access to the S3 bucket for applications running on EC2 instances.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How should a company grant applications on Amazon EC2 instances access to configuration files stored in an S3 bucket following AWS security best practices?
A
By using the AWS account root user access keys.
B
By using the AWS access key ID and the EC2 secret access key.
C
By using an IAM role with the necessary permissions.
D
By activating multi-factor authentication (MFA) and versioning on the S3 bucket.
No comments yet.