Effect, Action, and Resource in Policies
You'll learn the three essential building blocks that every IAM policy statement uses to define permissions.
What You're Building
Every IAM policy statement (whether identity-based or resource-based) follows a simple formula with three core components:
- Effect - Is this an "Allow" or "Deny"?
- Action - What operation can be performed?
- Resource - Which specific resource does this apply to?
Think of it like a permission slip: "I (Effect: Allow/Deny) you to (Action: read) this (Resource: specific book)."
The Three Components Explained
Effect
The decision: either Allow or Deny. This is binary—you're either granting permission or explicitly blocking it. "Deny" always wins if there's a conflict (following the principle of least privilege).
Action
The what—what operation is being permitted or denied? Actions follow the pattern service:Operation. For example: s3:GetObject (read a file), ec2:StartInstance (start a virtual machine), or dynamodb:PutItem (write data).
Resource
The where—which specific resource(s) does this permission apply to? Resources are identified by their unique identifiers (ARNs in AWS, resource IDs in other clouds). For example: a specific storage bucket, a particular database, or even "*" for all resources (use carefully!).
How They Work Together
These three components combine to form one complete permission statement: "Allow (Effect) the action s3:GetObject (Action) on bucket-name/photos/* (Resource)." Without all three, the permission is incomplete or meaningless.
Key Takeaway: Every IAM policy statement requires an Effect (Allow/Deny), an Action (what operation), and a Resource (which target)—these three components form the complete grammar of cloud permissions.