How does cross-account access evaluation differ from same-account?
AdvancedConceptIAM Advanced, STS and Multi-Account
Answer
Within one account, an Allow in either the identity policy or the resource policy is enough (the union). Across accounts, both sides must allow: the resource owner's resource policy (or a trust policy) must name the external principal, and the calling account's identity policy must allow the action.
Typical example: to read an S3 bucket in account B from a role in account A, B's bucket policy allows A's role (or the account root) and A's role policy allows s3:GetObject on that bucket. If the object was uploaded by another account without bucket-owner-enforced ownership, ACL ownership also bites, which is why we enable BucketOwnerEnforced.
More on IAM Advanced, STS and Multi-Account
Explain the IAM policy evaluation logic.AdvancedHow does `sts:AssumeRole` work, step by step?IntermediateWhat is the difference between AssumeRole, AssumeRoleWithWebIdentity and AssumeRoleWithSAML?IntermediateWhat is a permission boundary and when would you use one?IntermediateWhat do Service Control Policies do and not do?IntermediateDeny-list vs allow-list SCP strategy: which do you pick?Advanced