Principal, Action, and Resource Elements
What you'll learn: How to specify who can do what to which resources in IAM policy statements.
The Three Core Elements of Access Control
Every IAM policy statement answers three fundamental questions:
- Principal – Who is making the request? (User, role, service, or account)
- Action – What are they trying to do? (Read a file, delete a database, start a server)
- Resource – Which specific thing are they trying to access? (A particular storage bucket, database, or VM)
Think of it like a security checkpoint at a building: the guard needs to know who you are (Principal), what you want to do (Action - tour, deliver, work), and where you want to go (Resource - 3rd floor, basement, executive suite).
How They Work Together
In resource-based policies, you explicitly state the Principal (who gets access from outside).
In identity-based policies (attached to users/groups/roles), the Principal is implied (whoever has the policy attached), but you still specify the Action and Resource.
Example scenario in plain English:
"Allow the analytics team (Principal) to read and list (Actions) data from the customer-reports bucket (Resource)."
All three elements must align for access to be granted. If any piece is missing or doesn't match the request, access is denied by default.
Why This Matters
This three-part structure gives you surgical precision in controlling access. You're never granting blanket permissions—you're always specifying exactly who can do exactly what to exactly which resources.
Key Takeaway: Every permission decision requires three pieces: Principal (who), Action (what), and Resource (where)—think of them as the mandatory coordinates for any access request.