Skip to content

Adding Bedrock Guardrails integration#176

Open
mxr-mwaters wants to merge 3 commits intoaws-samples:mainfrom
mxr-mwaters:main
Open

Adding Bedrock Guardrails integration#176
mxr-mwaters wants to merge 3 commits intoaws-samples:mainfrom
mxr-mwaters:main

Conversation

@mxr-mwaters
Copy link
Copy Markdown

Issue #, if available:
129 - opened by another person. Slightly modified environment variable names from the original issue.

Description of changes:
Added Guardrail support. You can now enable/disable guardrails through an environment variable and also specify the guardrail and version to use via environment variables.
Added ENV variables:
ENABLE_GUARDRAIL (set to true to enable guardrail integration)
GUARDRAIL_IDENTIFIER (set to ARN of guardrail)
GUARDRAIL_VERSION (set to version of guardrail e.g. 1)
Please double check my work - we have been running this with good success so far, but that doesn't mean we have covered all cases.
Thank you for this repo - this has allowed us to move forward quickly!

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

dg-nthompson added a commit to maxar-infrastructure/bedrock-access-gateway that referenced this pull request Mar 11, 2026
  - Add ENABLE_GUARDRAIL, GUARDRAIL_IDENTIFIER, GUARDRAIL_VERSION env vars
  - Add guardrailConfig to Converse API requests when enabled
  - Add guardrail parameters to invoke_model for embeddings when enabled
  - Update README with Guardrails feature and documentation

  Based on PR aws-samples#176 by mxr-mwaters with optimized implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant