Back to Checks
aws

Bedrock has at least one guardrail configured in the audited region

bedrock_guardrails_configured
Service: bedrockSeverity: medium
OfficialBuilt-inVerified
Categories:gen-ai
Resource Type:Other

Amazon Bedrock guardrails provide reusable safety policies for filtering harmful or unwanted content in model inputs and outputs.

This evaluation checks whether at least one guardrail exists in each successfully scanned region. It does not verify that guardrails are attached to agents or passed on individual model invocation API calls.

Risk

Without any configured Bedrock guardrails in a region, teams lack a native reusable policy object for content filtering and safety controls. Applications may invoke models without standardized protections against harmful content, prompt injection, or sensitive-data exposure unless equivalent controls are enforced elsewhere.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler aws --checks bedrock_guardrails_configured

Recommendation

Create at least one Bedrock guardrail in each region where Bedrock is used, then separately ensure those guardrails are attached to relevant agents and invocation paths.

  • Configure content filters for harmful categories (hate, violence, sexual, misconduct)
  • Add sensitive information filters and denied topic policies
  • Apply guardrails at the API call level using guardrailIdentifier where supported

Remediation

CLI

aws bedrock create-guardrail --name example_resource --blocked-input-messaging 'Blocked' --blocked-outputs-messaging 'Blocked' --content-policy-config 'filtersConfig=[{type=HATE,inputStrength=HIGH,outputStrength=HIGH}]'

Terraform

resource "aws_bedrock_guardrail" "example_resource" {
  name                      = "example_resource"
  blocked_input_messaging   = "Blocked"
  blocked_outputs_messaging = "Blocked"

  content_policy_config {
    filters_config {
      type            = "HATE"          # Critical: configures content filtering
      input_strength  = "HIGH"
      output_strength = "HIGH"
    }
  }
}

NativeIaC

Resources:
  example_resource:
    Type: AWS::Bedrock::Guardrail
    Properties:
      Name: example_resource
      BlockedInputMessaging: "Blocked"
      BlockedOutputsMessaging: "Blocked"
      ContentPolicyConfig:
        FiltersConfig:
          - Type: HATE
            InputStrength: HIGH       # Critical: configures content filtering
            OutputStrength: HIGH

Other

1Open the AWS Console and go to Amazon Bedrock
2Select **Guardrails** from the navigation pane
3Click **Create guardrail**
4Configure content filters for harmful categories
5Set input and output messaging for blocked content
6Click **Create guardrail**

Check Code

from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.bedrock.bedrock_client import bedrock_client


class bedrock_guardrails_configured(Check):
    """Ensure Bedrock guardrails are configured in successfully scanned regions.

    This check verifies that at least one Amazon Bedrock guardrail is configured
    in each successfully scanned region.
    - PASS: At least one Bedrock guardrail is configured in the region.
    - FAIL: No Bedrock guardrails are configured in the region.
    """

    def execute(self) -> list[Check_Report_AWS]:
        """Execute the check logic.

        Returns:
            A list of reports containing the result of the check.
        """
        findings = []
        for region in sorted(bedrock_client.guardrails_scanned_regions):
            regional_guardrails = sorted(
                (
                    guardrail
                    for guardrail in bedrock_client.guardrails.values()
                    if guardrail.region == region
                ),
                key=lambda guardrail: guardrail.name,
            )

            if regional_guardrails:
                for guardrail in regional_guardrails:
                    report = Check_Report_AWS(
                        metadata=self.metadata(), resource=guardrail
                    )
                    report.status = "PASS"
                    report.status_extended = f"Bedrock guardrail {guardrail.name} is available in region {region}. This does not confirm that the guardrail is attached to agents or used on model invocations."
                    findings.append(report)
            else:
                report = Check_Report_AWS(metadata=self.metadata(), resource={})
                report.region = region
                report.resource_id = "bedrock-guardrails"
                report.resource_arn = f"arn:{bedrock_client.audited_partition}:bedrock:{region}:{bedrock_client.audited_account}:guardrails"
                report.status = "FAIL"
                report.status_extended = (
                    f"Bedrock has no guardrails configured in region {region}."
                )
                findings.append(report)

        return findings