View a markdown version of this page

How an evaluation reads your data - AWS Context

How an evaluation reads your data

An evaluation reads the Agent Context with the caller’s identity, as an agentic retrieval by that caller would. When you call StartEvaluation, AWS Context stores a forward access session (FAS) for the caller with the evaluation. Each scenario’s retrieval uses that session. For how this identity reaches your sources, see How access controls apply when AWS Context queries data.

This has the following consequences:

  • With a trusted identity – The caller’s session carries a user’s identity, such as an IAM Identity Center session. The evaluation reads public content and the content that the user’s access allows. Examples are knowledge base documents with access control and AWS Lake Formation tables. The scores reflect that user’s access.

  • Without a trusted identity – The caller is, for example, an application role. Agent Context content and knowledge base documents with access control return only their public part. For what’s public, see Source ACLs. For other sources, the identity that reads the source decides what comes back: the connection’s data access role, or the caller’s own credentials.

  • AWS Context refuses an Agent Context that has a third-party connection, such as Snowflake or Databricks, with a ValidationException. Those sources need the user’s consent at query time, which an evaluation can’t give.

  • Your IAM Identity Center instance might use the legacy experience of trusted identity propagation. Then StartEvaluation refuses a permission set session on an Agent Context with an AWS Glue Data Catalog connection, with an AccessDeniedException. For more information, see The user signs in with a permission set in the legacy experience.

  • AWS Context doesn’t store evaluation retrievals as traces for trace analysis.

Protect evaluation logs

The sessions log group holds each scenario’s question, answer, and retrieved context, including content that only the caller can read. Every evaluation in an account and Region writes to this one log group. A caller who runs evaluations with evaluators needs logs:StartQuery and logs:GetQueryResults on the whole log group. That caller can read the sessions of every other evaluation, and the write permissions let it add events to their log streams. The results log group holds each evaluator’s explanation of its score, which can describe the answer. Other Amazon Bedrock AgentCore batch evaluations in the account that use the default results destination write to it too.

If some callers must not see what other callers can read, run their evaluations in separate accounts. Restrict read access to both log groups. AWS managed policies such as CloudWatchLogsReadOnlyAccess allow reading every log group, including these.