Skill 2.1.3
Design least-privilege access controls such as cross-account access and temporary credentials (for example, by using IAM roles, IAM policies, permissions boundaries, external IDs, session policies, attribute-based access control [ABAC]).
Key Concepts
Patterns: IAM roles in target accounts trusted by source accounts (with external IDs for third parties and session tags for ABAC), resource-based policies (S3, KMS, SQS, SNS, Lambda, Secrets Manager, ECR) granting another account directly, and AWS RAM for sharing resources such as subnets and TGWs. Cross-account requests need allows on both the identity side and the resource side.
Guardrails: SCPs and RCPs (resource control policies) build a data perimeter using aws:PrincipalOrgID, aws:ResourceOrgID and network conditions. IAM Access Analyzer identifies resources shared outside the organisation and validates policies.
Permissions boundaries cap the maximum permissions of roles that developers create, so teams can create their own roles without escalating privilege. Session policies, passed when assuming a role or federating, narrow a single session further. ABAC grants access when principal tags match resource tags (for example aws:PrincipalTag/project equals aws:ResourceTag/project), so one policy scales across many projects without editing. All of these work with temporary credentials from STS, which expire automatically.