
Answer-first summary for fast verification
Answer: Add S3 bucket listing permission to the EC2 instance profile.
The correct answer is B. Updating the IAM instance profile attached to the EC2 instance to include the S3:ListBucket permission allows the application to list the objects in the S3 bucket securely. This follows the principle of least privilege, granting the minimum necessary permissions. Option A, which grants full S3 permissions (S3:*), provides more access than necessary, which is not considered secure. Updating developer permissions (Option C) is not appropriate because the access issue pertains to the EC2 instance's role. Modifying the S3 bucket policy to specify the account number of the EC2 instance (Option D) is unnecessarily complex and less secure.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How can an EC2 instance gain secure access to list objects within an S3 bucket when it currently fails to display them?
A
Assign full S3 permissions to the EC2 instance profile.
B
Add S3 bucket listing permission to the EC2 instance profile.
C
Extend the developer's user permissions for S3 bucket listing.
D
Alter the S3 bucket policy for EC2 instance account number access.
No comments yet.