1. Effect
effect decides whether the statement grants (Allow) or blocks (Deny) the listed action.
effect: AllowTyporithm · medium
Step 1 of 8 · intro card
Cloud Security
Cloud IAM grants permissions to identities and roles. Follow least privilege: narrow the actions and resources, avoid wildcards, and prefer short-lived role credentials over long-lived keys. A policy is effect + action + resource + condition.
Identity and Access Management (IAM) controls who — users, roles, services — can do what in a cloud account. Permissions are expressed as policies attached to identities.
A policy statement has four parts: effect (Allow or Deny), action (the API operation), resource (the ARN it applies to), and an optional condition (extra requirements like requiring TLS).
The guiding rule is least privilege: grant only the actions and resources an identity truly needs, avoid broad wildcards, and prefer short-lived role credentials over long-lived access keys.
A policy is effect + action + resource + condition.
Least privilege: narrow actions and resources, avoid wildcards.
Prefer short-lived role credentials over long-lived keys.
policy:
effect: Allow
action: s3:GetObject
resource: arn:aws:s3:::bucket/*
condition: SecureTransport-true
principle: least-privilegeConnect each part of the code to the concept before you type.
effect decides whether the statement grants (Allow) or blocks (Deny) the listed action.
effect: Allowaction names the specific API operation permitted — here only reading an object, not writing or deleting.
action: s3:GetObjectresource scopes the permission to a particular ARN so it cannot touch other buckets.
resource: arn:aws:s3:::bucket/*condition adds an extra requirement — here that the request arrives over TLS.
condition: SecureTransport-trueGrant only the narrow actions and resources an identity truly needs, nothing more.
principle: least-privilegeRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.