Implementation Guide | Healthcare

    Controlling PHI Retrieval in Amazon Bedrock Agents Knowledge Bases

    To control PHI retrieval in Amazon Bedrock Knowledge Bases, treat each stage of the agent flow as an access decision. Scope content before it is indexed, evaluate the user and task at query time, inspect what reaches the model and any tools, and filter the response. Native AWS controls cover parts of this. Runtime policy enforcement per interaction (allow, redact, block, escalate) and per-interaction evidence cover the rest, and support the audit controls requirement at 45 CFR 164.312(b).

    1. 1

      Ingestion

      Clinical notes, discharge summaries and operational documents may be loaded together. Anything ingested becomes retrievable by design, so scoping starts here.

    2. 2

      Vector store and index

      Chunks from different patients, departments or sensitivity levels can sit in one index. Separation depends on how data sources, indexes and metadata are organised.

    3. 3

      Retrieval query

      A semantic query returns what is similar, not what the requester is entitled to see. Entitlement has to be applied as a filter or a decision.

    4. 4

      Chunks passed to the model

      Once retrieved text is in the prompt, the model can repeat any of it. Controls applied only to the final answer leave PHI in model input.

    5. 5

      Action groups and tool calls

      An agent can pass retrieved PHI as parameters to another system. This is a disclosure path that a response filter never sees.

    6. 6

      Final response

      The answer may include identifiers or clinical detail the user's role does not warrant, even when the question was legitimate.

    7. 7

      1. Establish identity and task

      Bind each request to the end user, the agent, and the declared purpose, so every later decision has a subject.

    8. 8

      2. Constrain retrieval

      Apply data source scoping and metadata filters derived from the user's entitlements before the query runs.

    9. 9

      3. Evaluate retrieved context

      Before chunks reach the model, allow them, redact identifiers not needed for the task, or block the request.

    10. 10

      4. Evaluate tool calls

      Check parameters sent to action groups and other tools. Block or redact PHI that the destination has no need to receive.

    11. 11

      5. Escalate by exception

      Route high-risk requests, such as broad record access, to a human approver and link the decision to the original request.

    12. 12

      6. Filter the response

      Apply the same policy to the final answer, and record what was returned.

    Evidence to produce for each interaction

    • Requesting user, agent identity and declared task or purpose
    • The retrieval query and the sources or chunks returned
    • The policy applied and the decision: allow, redact, block or escalate
    • What was redacted or withheld, and what the model and tools received
    • Approver identity, time and outcome for any escalation, linked to the original request
    • Timestamps and a retention period consistent with your documented policy

    What native controls decide, and the questions to test

    Healthcare teams typically start with IAM and resource policies, data source and vector store scoping, metadata filtering on retrieval, Bedrock Guardrails for sensitive information, encryption, and CloudTrail and model invocation logging. Each is useful, and each answers a narrower question than "was this person allowed to see this PHI for this task".

    IAM decides which principals can call which services and resources. Scoping decides what content exists to be retrieved. Metadata filtering can narrow a query to tagged subsets, provided the tags exist and the filter is set per request. Content filters inspect text for sensitive information. Encryption protects stored and transmitted data. Logging records that calls happened.

    The gaps appear in the interaction. Test each control against four questions in your own environment. Does it see the end user, or only a service role the agent assumes? Can it vary by task within one session? Does it act on retrieved context and tool parameters, or only on the final output? Does it produce a record of the decision, or only of the call? Where the answer is no, the control is still valuable but is not enforcing minimum-necessary access per interaction on its own.

    The HIPAA hooks that matter for agents

    As of November 2026, the Security Rule technical safeguards at 45 CFR 164.312 remain in place. The access control standard requires technical policies and procedures for electronic information systems that maintain ePHI, allowing access only to those persons or software programs that have been granted access rights under 164.308(a)(4). Unique user identification is a required specification. The audit controls standard at 164.312(b) requires hardware, software, and/or procedural mechanisms that record and examine activity in information systems that contain or use ePHI.

    Two practical readings follow. First, the phrase "software programs" gives a reason to treat an agent or tool as an entity with defined access rights, rather than as an extension of whoever is chatting with it. This is an interpretation, not regulatory text. Second, "record and examine" asks for more than retained logs. HHS also notes that entities may meet the access control standard through a combination of access control methods and technical controls, which is consistent with layering native controls and runtime enforcement.

    No single Bedrock feature should be described as satisfying HIPAA. Compliance depends on how controls are combined, configured and evidenced in your environment.

    Where Trussed fits

    Trussed is runtime control for consequential AI, built for regulated enterprises that must show what their AI was allowed to do and what it did. It enforces policy in the execution path across models, agents, tools and MCP servers, with allow, redact, block, rate limit and escalate for human approval applied to individual interactions and tool calls. Enforcement is at runtime, not reviewed after the fact.

    The same enforcement generates continuous audit-ready evidence mapped to HIPAA, including PHI handling and 164.312(b) audit controls. Trussed supports self-managed deployment in the customer cloud, with configurable retention and data residency, and runs in production with healthcare and pharma organizations.

    The design steps above stand on their own. Native AWS controls, a clear identity model and a defined evidence record are the foundation. Runtime enforcement is the layer that makes the per-interaction decision and records it.

    PHI decision points in an agent retrieval flow

    Ingestion

    What content enters the knowledge base

    Retrieval

    Which chunks a query may return

    Model input

    What retrieved text the model sees

    Tool calls

    What actions receive PHI

    Response

    What the user finally reads

    Evidence

    What record shows the decision

    Review your PHI retrieval path

    Walk through your agent and knowledge base flow with us and see how enforcement and evidence apply at each decision point.

    Explore Agent and Tool-Call Enforcement
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.