[{"data":1,"prerenderedAt":69},["ShallowReactive",2],{"pattern-bedrock-guardrails-enforcement-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":30,"level":31,"meta":32,"patternArch":33,"resources":53,"s3URL":6,"services":6,"stem":64,"testing":65,"videoId":6,"__hash__":68},"patterns\u002Fpatterns\u002Fbedrock-guardrails-enforcement-cdk.json","Amazon Bedrock Guardrails Account-Level Enforcement",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk destroy\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fnithin-chandran-r.json",{"text":13},[14],"\u003Ccode>cdk deploy\u003C\u002Fcode>","Deploy an Amazon Bedrock Guardrail with content and topic filters to demonstrate automatic enforcement on all Amazon Bedrock calls without specifying guardrailIdentifier.","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Fbedrock-guardrails-enforcement-cdk","serverless-patterns\u002Fbedrock-guardrails-enforcement-cdk","bedrock-guardrails-enforcement-cdk","lib\u002Fbedrock-guardrails-enforcement-stack.ts",{"headline":25,"text":26},"How it works",[27,28,29],"This pattern deploys an Amazon Bedrock Guardrail with content filters (hate, insults, violence, sexual, misconduct, prompt attacks) and a topic filter (investment advice), then enforces it at the account level so ALL Amazon Bedrock API calls are automatically guarded.","The workflow: (1) CDK creates a CfnGuardrail with content and topic policies, (2) a CfnGuardrailVersion publishes a numbered version, (3) an AWS::Bedrock::EnforcedGuardrailConfiguration resource enables account-wide enforcement, (4) a test AWS Lambda function demonstrates that safe prompts pass through while violating prompts are blocked - without specifying any guardrailIdentifier in the Converse API call.","Enforced guardrails apply to every Amazon Bedrock invocation in the account. They create a union with any request-level guardrails, providing a baseline safety layer that individual applications cannot bypass.","TypeScript","300",{},{"icon1":34,"icon2":39,"icon3":43,"line1":46,"line2":50},{"x":35,"y":36,"service":37,"label":38},20,50,"lambda","AWS Lambda",{"x":40,"y":36,"service":41,"label":42},55,"bedrock","Amazon Bedrock",{"x":44,"y":36,"service":41,"label":45},85,"Bedrock Guardrail",{"from":47,"to":48,"label":49},"icon1","icon2","Converse API",{"from":48,"to":51,"label":52},"icon3","Enforced",{"bullets":54},[55,58,61],{"text":56,"link":57},"Amazon Bedrock Guardrails","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002Fuserguide\u002Fguardrails.html",{"text":59,"link":60},"Enforced Guardrails - Account-Level Configuration","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002Fuserguide\u002Fenforced-guardrails.html",{"text":62,"link":63},"Amazon Bedrock Converse API","https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002Fuserguide\u002Fconversation-inference-call.html","patterns\u002Fbedrock-guardrails-enforcement-cdk",{"text":66},[67],"See the GitHub repo for detailed testing instructions.","XND7tkzRwJMQFHyHlb3OFKEQLWGsUJ6QRXUE9MpTHmM",1787308503441]