View a markdown version of this page

Common cross-account errors - AWS Context

Common cross-account errors

The following table lists common cross-account problems.

Symptom Cause Resolution

AWS Glue Data Catalog rejects the resource policy with Discovery actions must be scoped to the root catalog ARN

The discovery actions (glue:SearchAssets and glue:GetAsset) share a statement with other actions, or name a resource other than the root catalog ARN.

Move the discovery actions into their own statement, with only the root catalog ARN as the resource.

AWS Glue Data Catalog rejects the resource policy with principal does not exist

A role named in the policy was created recently.

Wait, and then apply the policy again.

The AWS Glue Data Catalog resource policy exceeds the size limit

The policy exceeds the 10 KB limit.

Reduce the policy size, for example, by listing the roles of several Agent Context accounts as principals in one set of statements.

A connection to Amazon Redshift, Aurora PostgreSQL, or RDS for Oracle is ACTIVE, but no tables appear in the Agent Context

The ingestion role’s context:SourceArn condition doesn’t include the source account’s connection/* ARN.

Add arn:aws:glue:region:account-id:connection/* to the context:SourceArn condition on the ingestion role.

Real-time retrieval fails for Amazon Redshift, Aurora PostgreSQL, or RDS for Oracle

The identity that reads the source can’t read or decrypt the AWS Glue connection’s secret.

Add the secret resource policy and the key policy statement in the source account. Confirm that the secret is encrypted with a customer managed key.

Real-time retrieval against Amazon S3 Tables fails with not authorized to call lakeformation:GetDataAccess

The identity that reads the source has no AWS Lake Formation grants on the table bucket’s namespace and tables.

In the source account, grant the identity that reads the source DESCRIBE on the namespace, and DESCRIBE and SELECT on its tables (see Additional grants for Amazon S3 Tables).

Connection creation fails for a knowledge base

The knowledge base policy in the source account doesn’t allow bedrock:GetKnowledgeBase for the identity that reads the source.

In the source account, add the ContextReadKnowledgeBase statement to the knowledge base policy. Name the exact role ARN of the identity that reads the source.

A knowledge base connection is ACTIVE, but no content from the knowledge base appears in the Agent Context

The knowledge base policy or the ingestion role’s policy doesn’t allow bedrock:SendKnowledgeBaseEntities. Or the role’s context:SourceArn condition names a different knowledge base.

Check both sides of the grant: the ContextIngestion statement in the knowledge base policy, and the IngestFromKnowledgeBase and SendKnowledgeBaseEntities statements on the ingestion role.