Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Last active January 12, 2025 01:12
Show Gist options
  • Select an option

  • Save KyMidd/eec50c012bdc45e49809fdf7d36f0769 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/eec50c012bdc45e49809fdf7d36f0769 to your computer and use it in GitHub Desktop.
resource "aws_bedrock_guardrail" "guardrail" {
provider = aws.west2
name = "DevOpsBotGuardrail"
blocked_input_messaging = "Your input has been blocked by our content filter. Please try again. If this is an error, discuss with the DevOps team."
blocked_outputs_messaging = "The output generated by our system has been blocked by our content filter. Please try again. If this is an error, discuss with the DevOps team."
description = "DevOpsBot Guardrail"
content_policy_config {
filters_config {
input_strength = "MEDIUM"
output_strength = "MEDIUM"
type = "INSULTS"
}
# ...
sensitive_information_policy_config {
pii_entities_config {
action = "ANONYMIZE"
type = "US_SOCIAL_SECURITY_NUMBER"
}
}
topic_policy_config {
topics_config {
name = "investment_topic"
examples = ["Where should I invest my money ?"]
type = "DENY"
definition = "Investment advice refers to inquiries, guidance, or recommendations regarding the management or allocation of funds or assets with the goal of generating returns."
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment