When to use cross-account access
Use cross-account access when the data you want in an Agent Context is in a different AWS account. For example, a central data team owns the catalog and data sources in one account, and application teams build Agent Contexts in their own accounts.
You can connect the following sources across accounts. AWS Context ingests metadata from every source. Some sources also support real-time retrieval. With real-time retrieval, AWS Context queries the source’s data when an agent asks a question (see How AWS Context answers questions over structured data). Real-time retrieval needs additional permissions in both accounts.
| Source | Real-time retrieval | Source account access for real-time retrieval |
|---|---|---|
|
AWS Glue Data Catalog tables |
Yes |
Amazon S3 bucket policy (see Additional grants for AWS Glue Data Catalog tables) |
|
Amazon S3 Tables |
Yes |
Table bucket policy and AWS Lake Formation grants (see Additional grants for Amazon S3 Tables) |
|
Amazon DynamoDB |
Yes |
Table resource policy (see Additional grants for Amazon DynamoDB) |
|
Amazon Redshift, Amazon Aurora PostgreSQL, and Amazon RDS for Oracle |
Yes |
AWS Secrets Manager secret encrypted with a customer managed AWS Key Management Service (AWS KMS) key (see Additional grants for databases that use Secrets Manager) |
|
Amazon S3 general purpose buckets, Amazon Athena, Amazon Data Firehose, Amazon Kinesis Data Streams, Amazon MSK (provisioned clusters), Amazon SageMaker AI, and Amazon RDS for MySQL, PostgreSQL, MariaDB, and SQL Server |
No |
Not applicable |
You can also connect Amazon Bedrock Managed Knowledge Bases across accounts (see Amazon Bedrock Managed Knowledge Bases).
AWS Context supports cross-account access in every AWS Region where it’s available (see Region availability).
The source account’s resources must be in the same AWS Region as the Agent Context. Cross-Region access isn’t supported.
The AWS Glue Data Catalog and the AWS data services that it describes, such as Amazon S3 buckets and DynamoDB tables, must be in the same source account.
For third-party catalogs, such as Databricks Unity Catalog and Snowflake Horizon, the AWS Glue connection to the catalog must be in the Agent Context account.