QuestionQ68

VerifiedSecurity

An application that is hosted on an Amazon EC2 instance needs access to files that are stored in an Amazon S3 bucket. The application lists the objects that are stored in the S3 bucket and displays a table to the user. During testing, a developer discovers that the application does not show any objects in the list.

What is the MOST secure way to resolve this issue?

Explanation

The s3:ListBucket permission enables listing objects within a specific bucket—the minimal permission needed for this task. It adheres to the principle of least privilege by granting only the necessary permission attached to the EC2 instance's IAM role. Option A (S3:*) is too permissive; options C and D apply permissions at wrong scopes.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!