AI Cloud Architect

Safeguard generative AI applications with Amazon Bedrock Guardrails

AWSHow-to by Hasan Shojaei, Bommi Shin, Krishnan Gopalakrishnan, Anuja Narwadkar and Sunita KopparAWS Artificial Intelligence Blog

In this post, we demonstrate how you can address these challenges by adding centralized safeguards to a custom multi-provider generative AI gateway using Amazon Bedrock Guardrails.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

A reference architecture adds Bedrock Guardrails screening, via the ApplyGuardrail API, in front of a custom multi-provider LLM gateway, so prompt safety and PII rules apply to both Bedrock and Azure OpenAI models.

Who it is for

Platform teams running a custom or off-the-shelf LLM gateway that need one set of safety, PII and audit controls across several model providers.

Key points

  • Guardrails are applied to the input prompt only, not to model responses, per the post's implementation.
  • Gateway logs sanitized requests, responses and guardrail metadata to S3 via Kinesis and Firehose, with Athena for chargeback queries.
  • Sample monthly cost for the infrastructure and guardrail calls is given as $170–$260, excluding high-volume usage.

The same at other vendors

Timeline

Posts about Amazon Bedrock Guardrails, oldest first.

  1. How-toBuild reliable AI systems with Automated Reasoning on Amazon Bedrock – Part 1 · AWS · How-to
  2. Update to an existing featureAmazon Bedrock Guardrails adds support for coding use cases · AWS · AnnouncementAlso published by AWS Artificial Intelligence Blog
  3. New featureAutomated Reasoning checks now include natural language test Q&A generation · AWS · Announcement
  4. Read firstStreamline AI operations with the Multi-Provider Generative AI Gateway reference architecture · AWS · Blog post
  5. This postSafeguard generative AI applications with Amazon Bedrock Guardrails
  6. Blog postAutomated Reasoning checks rewriting chatbot reference implementation · AWS · Blog post
  7. Update to an existing featureAutomated Reasoning policies now include references to the source document · AWS · Announcement
  8. How-toBuild safe generative AI applications like a Pro: Best Practices with Amazon Bedrock Guardrails · AWS · How-to
  9. How-toBuilding age-responsive, context-aware AI with Amazon Bedrock Guardrails · AWS · How-to
Show all 20 posts
  1. How-toIntegrate tokenization with Amazon Bedrock Guardrails for secure data handling · AWS · How-to
  2. Update to an existing featureCustomer managed KMS keys now available for Automated Reasoning checks · AWS · Announcement
  3. How-toBuild reliable AI systems with Automated Reasoning on Amazon Bedrock – Part 1 · AWS · How-to
  4. Update to an existing featureAmazon Bedrock Guardrails adds support for coding use cases · AWS · AnnouncementAlso published by AWS Artificial Intelligence Blog
  5. New featureAutomated Reasoning checks now include natural language test Q&A generation · AWS · Announcement
  6. Read firstStreamline AI operations with the Multi-Provider Generative AI Gateway reference architecture · AWS · Blog post
  7. This postSafeguard generative AI applications with Amazon Bedrock Guardrails
  8. Blog postAutomated Reasoning checks rewriting chatbot reference implementation · AWS · Blog post
  9. Update to an existing featureAutomated Reasoning policies now include references to the source document · AWS · Announcement
  10. How-toBuild safe generative AI applications like a Pro: Best Practices with Amazon Bedrock Guardrails · AWS · How-to
  11. How-toBuilding age-responsive, context-aware AI with Amazon Bedrock Guardrails · AWS · How-to
  12. Generally availableAmazon Bedrock Guardrails announces general availability of cross-account safeguards · AWS · AnnouncementAlso published by AWS News Blog
  13. Blog postHow Automated Reasoning checks in Amazon Bedrock transform generative AI compliance · AWS · Blog post
  14. Region expansionAmazon Bedrock Guardrails adds automated reasoning checks in Sydney · AWS · Announcement
  15. New featureSafeguard your agentic AI applications with the Amazon Bedrock Guardrails InvokeGuardrailChecks API · AWS · AnnouncementAlso published by What's New with AWS
  16. New featureAutomated Reasoning checks in Amazon Bedrock Guardrails add new policy refinement workflows · AWS · Announcement
  17. How-toBest practices for applying Amazon Bedrock Guardrails to code generation workflows · AWS · How-to
  18. New featureAutomated Reasoning policy refinement in Amazon Bedrock · AWS · Announcement
  19. New featureAmazon Bedrock Guardrails now supports Standard tier for contextual grounding checks · AWS · Announcement
  20. How-toBest practices for writing Denied Topics in Amazon Bedrock Guardrails · AWS · How-to

Go deeper