

# Cross-account access

You can connect an Agent Context to data in another AWS account. This section uses two terms:
+ The *source account* owns the data and its AWS Glue Data Catalog or knowledge base.
+ The *Agent Context account* owns the Agent Context and the `Connection`.

A cross-account connection uses an ingestion role and, optionally, a data access role. Both roles are in the Agent Context account:
+ The *data access role* (optional) is a role that AWS Context assumes to read the source instead of using the caller’s credentials. You specify it in the connection’s `accessConfig`.
+ The *ingestion role* is the role that AWS Glue Data Catalog or Amazon Bedrock Knowledge Bases assumes to send data into the Agent Context. You specify it in the connection’s `ingestionConfig`.

 AWS Context reads the source with one of two identities:
+ The caller’s credentials (the default). The caller is the principal that calls the Agent Context.
+ The connection’s data access role, if you set one.

 AWS Context doesn’t check access to the source account when you create a connection without a data access role. To confirm the grants, query the source as one of the callers after you create the connection.

The policies in this section grant access to the identity that reads the source. If the connection uses the caller’s credentials, name the caller’s IAM role in the policies.

The source account grants that identity and the ingestion role access in resource policies on the source. The Agent Context account then creates a `Connection` that references the source by its Amazon Resource Name (ARN).

To grant another account access to query an Agent Context, see [Grant cross-account access to an Agent Context](cross-account-consumption.md).

**Topics**
+ [When to use cross-account access](cross-account-when.md)
+ [Grant access in the source account](cross-account-share.md)
+ [Set up the connection in the Agent Context account](cross-account-grant.md)
+ [Verify the connection](cross-account-verify.md)
+ [Common cross-account errors](cross-account-errors.md)