New pattern - apigw-lambda-bedrock-guardrails-cdk#3113
Open
NithinChandranR-AWS wants to merge 1 commit into
Open
Conversation
…rdrails Deploy a REST API that invokes Bedrock with per-request Guardrails for content and topic filtering. Each InvokeModel call passes guardrailIdentifier and guardrailVersion for fine-grained control. Differentiates from bedrock-guardrails-cross-account-cdk (account-level) by applying guardrails at the application level per-request. Deployed and tested on live AWS account.
Contributor
|
Seems to be a duplicate of #3067 |
Contributor
Author
|
Not a duplicate -- they're different layers of the same feature. #3067 is account-level enforcement (PutEnforcedGuardrailConfiguration -- guardrail applies to ALL Bedrock calls in the account without any code changes). This PR (#3113) is application-level guardrails (individual Lambda passes guardrailIdentifier in each Converse API call). Different use cases: #3067 for org-wide compliance, this one for app-specific content filtering where you choose which calls get guarded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Deploy a REST API that invokes Amazon Bedrock with application-level Guardrails — per-request content and topic filtering.
Application-level vs Account-level
This pattern applies guardrails per-request by passing
guardrailIdentifierandguardrailVersionin each InvokeModel call. Different APIs can use different guardrails or skip them entirely. For account-wide enforcement, seebedrock-guardrails-cross-account-cdk.What it does
Testing
Deployed and tested:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.