Data analysts who sign in to AWS account A need to query a data lake owned by account B with Amazon Athena. Account B's security team must define the analysts' data permissions entirely in account B, revoke them with a single change, and avoid creating any IAM users. Which approach meets these requirements?
Choose one.
Cross-account access to resources is normally granted by a role in the account that owns the resources. The role's trust policy names who may assume it; its permissions policy defines what they can do. Callers use sts:AssumeRole and receive temporary credentials.
The deciding constraints are that account B must hold the whole permission definition and be able to revoke it in one place. A role in account B does exactly that: its permissions policy is the only grant on the data, and changing its trust policy cuts off every analyst. Resource-policy approaches (bucket policy or access point policy naming account A) split the grant across both accounts because the calling identity also needs an allow in its own account. A role in account A is the wrong direction.
- Find the owner of the resources: account B.
- Ask where permissions must live: entirely in account B, revocable in one change.
- Choose a role in account B trusted by account A, assumed with STS for temporary credentials.
Exam tip: To give another account access you control in one place, create the role in your account and trust theirs.
Applying Authentication Mechanisms: IAM, Secrets Manager, and Networks — the lesson that teaches this.