SCPs, permission boundaries and session policies: when do you use each?
AdvancedProductionIdentity, Least Privilege & OIDC for CI
Answer
All three only limit permissions; none of them grant anything. The effective permission is the intersection.
| Control | Scope | Typical production use |
|---|---|---|
| SCP | Whole account or OU | Org guardrails: deny leaving the org, disabling CloudTrail, unapproved regions |
| Permission boundary | A single role or user | Delegated IAM: teams may create roles only if they carry the boundary |
| Session policy | One assumed session | Narrow a broad role for a specific job (e.g. CI step reads one bucket) |
The delegated pattern: allow iam:CreateRole only with the condition iam:PermissionsBoundary equal to the approved boundary ARN, and deny edits to the boundary itself. That lets teams self-serve roles without being able to create an admin.
More on Identity, Least Privilege & OIDC for CI
How do you design AWS OIDC trust for GitHub Actions so only production deploys can assume the prod role?IntermediateWhat are the common mistakes in OIDC trust policies for CI?AdvancedHow do you configure OIDC for GitLab CI to AWS?IntermediateHow do you get from "everyone has AdministratorAccess" to least privilege without breaking things?AdvancedWhat SCP guardrails do you apply across an AWS organisation?IntermediateHow do you implement just-in-time (JIT) privileged access for production?Intermediate