

# How AWS Context roles relate to IAM

The four roles are responsibility descriptions, not AWS Identity and Access Management (IAM) identities. You implement them with IAM principals and permissions: an IAM role or user carries the permissions for one or more responsibilities, and AWS Context authorizes each request against those permissions. Administration and contribution are governed by the IAM permissions an administrator grants; consumption is governed by the caller’s IAM and AWS Lake Formation permissions, evaluated per query.

For cross-account access, attach a resource-based policy to an Agent Context to control which AWS accounts can call operations on it. Set the policy with `PutResourcePolicy`, read it with `GetResourcePolicy`, and remove it with `DeleteResourcePolicy`. A resource-based policy governs cross-account access at the account level; it does not replace the per-query consumption scoping that filters an answer to the caller’s identity.