1.IAM vocabulary: identities, policies, resources, actions
An IAM policy is a JSON document that answers one question: can this identity take this action on this resource, under these conditions? Every other IAM concept is a variation on how that document is written or attached.
Key features
- Identity = who: an IAM user, role, or federated principal
- Action = what: an API operation, like s3:GetObject
- Resource = which thing: identified by its ARN
- Condition = when/how: IP range, MFA present, tag match
- A policy is a JSON document combining all four
The four parts of every IAM policy statement
- Identity — who is asking
- Action — what they want to do
- Resource — which thing, by ARN
- Condition — under what circumstances
Command
Effect + Action + Resource + Condition → one statement
Statement[] → one policy (JSON document)Every IAM policy answers who, what action, on which resource, under what condition — every other IAM feature is a variation on those four parts.