Interview Prep/AWS/IAM Advanced, STS and Multi-Account

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.

aws All AWS questions Roadmap: AWS core services

More on IAM Advanced, STS and Multi-Account