bedrock_guardrailsTier 1 · 70% confidence

security-bedrock-guardrails-when-using-bedrock-guardrails-with-the-post-call-h-137080f5

agent: security

When does this happen?

IF When using Bedrock Guardrails with the post_call hook only, guardrails are not applied to input content, leaving prompt injection or harmful inputs unchecked.

How others solved it

THEN Configure both pre_call and post_call modes in the LiteLLM proxy to ensure guardrails run on both input and output. For example, in the proxy config, set 'guardrails: ["pre_call", "post_call"]' for the Bedrock guardrail definition.

litellm_settings:
  guardrails:
    - name: bedrock_guardrail
      mode: ["pre_call", "post_call"]
      ...

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics