A cloud engineer must design a least-privilege IAM policy for a service account that uploads objects to a specific bucket and reads only metadata for a prefix. Which statement best reflects least privilege while allowing necessary behavior?

Answer

Scope permissions to the exact bucket and prefix and separate write from read permissions using distinct actions

Explanation

Least privilege requires limiting both resource scope (bucket/prefix) and action scope (metadata read vs object write). Separating permissions reduces unintended access paths.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list