Info icon
End of Life Notice: For Trend Cloud One™ - Conformity Customers, Conformity will reach its End of Sale on “July 31st, 2025” and End of Life “July 31st, 2026”. The same capabilities and much more is available in TrendAI Vision One™ Cloud Risk Management. For details, please refer to Upgrade to TrendAI Vision One™

Ensure Guardrails Are Associated with All Active Bedrock Agents

TrendAI Vision One™ provides continuous assurance that gives peace of mind for your cloud infrastructure, delivering over 1400 automated best practice checks.

Risk Level: High (not acceptable risk)

Ensure that every Amazon Bedrock agent has a guardrail associated and that the referenced guardrail still exists and has not been deleted. This rule extends the base check performed by the companion rule (which verifies only that an agent has a non-null guardrail identifier configured) by also cross-validating that the associated guardrail is still a live, existing resource. An agent can have a `guardrailIdentifier` value configured yet still be unprotected if the guardrail behind that identifier has since been deleted.

Security

An identity or automation with the bedrock:DeleteGuardrail permission can delete a guardrail (and all of its versions) independently of any agent configuration. Because the agent record itself is not automatically updated when its associated guardrail is deleted, the agent continues to reference a guardrail ID that no longer exists. In this state, the agent silently loses all content filtering, prompt injection protection, and PII redaction, while still appearing "protected" to a check that only inspects the agent's configuration. Closing this gap requires an additional call to the Bedrock GetGuardrail operation using the guardrail identifier referenced by the agent — a ResourceNotFoundException response means the guardrail has been deleted and the agent must be treated as unprotected, even though its guardrailIdentifier field is still populated.


Audit

To determine whether your Amazon Bedrock agents reference guardrails that still exist, perform the following operations:

Using AWS Console

  1. Sign in to the AWS Management Console.

  2. Navigate to Amazon Bedrock console available at https://console.aws.amazon.com/bedrock/.

  3. In the main navigation panel, under Build, select Agents Classic.

  4. In the Agents section, click on the name (link) of the agent that you want to examine, available in the Name column.

  5. On the agent details page, select the Aliases tab to identify the agent version that is currently serving production traffic. Each alias's Version column lists either a numbered (published) version or DRAFT. If no aliases are configured, or an alias is still routed to DRAFT, use DRAFT for the remainder of this check, keeping in mind that AWS recommends creating a published version and pointing production aliases to it rather than to the mutable DRAFT version.

  6. Select the Versions tab and choose the version identified in the previous step to open its read-only configuration. If you are checking DRAFT, choose Edit in Agent Builder at the top of the agent details page instead.

  7. In the Guardrail details section, check the Guardrail name attribute value for the selected agent version. If the Guardrail name attribute does not have a value, there is no guardrail associated with the selected Amazon Bedrock agent version, and it is non-compliant. Note the guardrail name and version if a value is present, then continue to step 8 to verify the guardrail still exists.

  8. In the main navigation panel, under Build, select Guardrails to list the Amazon Bedrock guardrails available in the current AWS region.

  9. Search for the guardrail name noted at step 7 in the Guardrails list. If the guardrail name cannot be found in the list, the guardrail referenced by the agent has been deleted, therefore the selected Amazon Bedrock agent is unprotected, even though a guardrail is technically configured on the agent.

  10. If the guardrail name is found, click on it and, in the Guardrail overview section, check the Status attribute. Confirm the status is Ready (i.e. not Deleting, Failed, or another non-ready state) and that the version referenced by the agent still exists among the guardrail's versions.

  11. Repeat steps no. 4 - 10 for each Bedrock agent available within the current AWS region.

  12. Change the AWS cloud region from the navigation bar to repeat the Audit process for other regions.

Using AWS CLI

  1. Run list-agents command (OSX/Linux/UNIX) to list the identifier (ID) of each Amazon Bedrock agent available in the selected AWS cloud region:

    aws bedrock-agent list-agents
      --region us-east-1
      --query 'agentSummaries[*].agentId'
    
  2. The command output should return the requested agent identifiers (IDs):

    [
    	"ABCDACBDAB",
    	"ABCABCABCA"
    ]
    
  3. Run list-agent-aliases command (OSX/Linux/UNIX) with the agent ID to determine which agent version is currently serving production traffic through each alias's routing configuration:

    aws bedrock-agent list-agent-aliases
      --region us-east-1
      --agent-id ABCDACBDAB
      --query 'agentAliasSummaries[*].routingConfiguration[*].agentVersion'
    
  4. The command output should return the agent version referenced by each alias's routing configuration:

    [
    	["1"]
    ]
    

    If no aliases are configured, or an alias's routing configuration returns DRAFT, use DRAFT as the agent version for the remainder of this procedure, keeping in mind that AWS recommends creating a published (numbered) agent version and pointing production aliases to it rather than routing production traffic to the mutable DRAFT version.

  5. Run get-agent-version command (OSX/Linux/UNIX) with the agent ID and the agent version identified at the previous step, and custom output filters to describe the ID of the Bedrock guardrail attached to the selected agent version:

    aws bedrock-agent get-agent-version
      --region us-east-1
      --agent-id ABCDACBDAB
      --agent-version 1
      --query 'agentVersion.guardrailConfiguration'
    
  6. The command output should return the identifier and version of the associated guardrail:

    {
    	"guardrailIdentifier": "abcd1234abcd",
    	"guardrailVersion": "DRAFT"
    }
    

    If the get-agent-version command output returns null, there is no guardrail associated with the selected Amazon Bedrock agent version, and it is non-compliant. If a guardrailIdentifier value is returned, as shown in the example above, continue to the next step to confirm that the referenced guardrail still exists.

  7. Run get-guardrail command (OSX/Linux/UNIX) using the guardrailIdentifier and guardrailVersion values returned at the previous step, to confirm that the referenced guardrail is still present:

    aws bedrock get-guardrail
      --region us-east-1
      --guardrail-identifier abcd1234abcd
      --guardrail-version DRAFT
    
  8. If the guardrail still exists, the command output should return the guardrail configuration details, including its status:

    {
    	"guardrailId": "abcd1234abcd",
    	"guardrailArn": "arn:aws:bedrock:us-east-1:123456789012:guardrail/abcd1234abcd",
    	"version": "DRAFT",
    	"status": "READY"
    }
    

    However, if the guardrail referenced by the agent version has been deleted, the get-guardrail command fails with a ResourceNotFoundException error, similar to the following:

    An error occurred (ResourceNotFoundException) when calling the GetGuardrail operation: The specified resource ARN was not found. Check the ARN and try your request again.
    

    If the get-guardrail command returns a ResourceNotFoundException error, the guardrail referenced by the selected Amazon Bedrock agent version no longer exists, therefore the agent is unprotected, even though it has a guardrailIdentifier value configured.

  9. Repeat steps no. 3 - 8 for each Amazon Bedrock agent available in the selected AWS region.

  10. Change the AWS cloud region by updating the --region command parameter value and repeat steps no. 1 - 9 to perform the Audit process for other regions.

Remediation / Resolution

To ensure that your Amazon Bedrock agents are protected by guardrails that exist and are active, perform the following operations:

Using AWS Console

  1. Sign in to the AWS Management Console.

  2. Navigate to Amazon Bedrock console available at https://console.aws.amazon.com/bedrock/.

  3. In the main navigation panel, under Build, select Guardrails.

  4. Choose Create guardrail to initiate the guardrail setup process (or select an existing, active guardrail if one is already available for reuse).

  5. For Step 1 Provide guardrail details, provide a unique name in the Name box, a Messaging for blocked prompts value, and (optional) select KMS key selection - optional to use your own KMS Customer-Managed Key (CMK) for the guardrail. Select Next to continue.

  6. For Step 2 - optional Configure content filters through Step 6 - optional Add contextual grounding check, configure the harmful category filters, prompt attack filters, denied topics, word filters, sensitive information (PII) filters, and contextual grounding checks that meet your protection requirements. Select Next after each step.

  7. For Step 7 Review and create, review the guardrail configuration and choose Create guardrail.

  8. In the main navigation panel, under Build, select Agents Classic.

  9. In the Agents section, click on the name (link) of the agent that you want to configure, and choose Edit in Agent Builder.

  10. In the Guardrail details section, choose Edit, select the name and version of an active Amazon Bedrock guardrail (either the one created at step 7, or an existing active guardrail), and choose Save and exit to attach the selected guardrail to your Amazon Bedrock agent.

  11. Repeat steps no. 9 and 10 for each Amazon Bedrock agent that references a missing or deleted guardrail, available in the current AWS region.

  12. Change the AWS cloud region from the navigation bar and repeat the Remediation process for other regions.

Using AWS CLI

  1. Run create-guardrail command (OSX/Linux/UNIX) to create a new Amazon Bedrock guardrail to replace the missing or deleted guardrail:

    aws bedrock create-guardrail
      --region us-east-1
      --name tm-project5-agent-guardrail
      --description 'Replacement guardrail for Amazon Bedrock agent'
      --blocked-input-messaging "Sorry, the model cannot answer this question."
      --blocked-outputs-messaging "Sorry, the model cannot answer this question."
      --content-policy-config 'filtersConfig=[{type="SEXUAL",inputStrength="HIGH",outputStrength="HIGH"},
      {type="HATE",inputStrength="HIGH",outputStrength="HIGH"},{type="VIOLENCE",inputStrength="HIGH",outputStrength="HIGH"},{type="INSULTS",inputStrength="HIGH",outputStrength="HIGH"},{type="MISCONDUCT",inputStrength="MEDIUM",outputStrength="MEDIUM"},{type="PROMPT_ATTACK",inputStrength="LOW",outputStrength="NONE"}]'
      --kms-key-id arn:aws:kms:us-east-1:123456789012:key/1234abcd-1234-abcd-1234-abcd1234abcd
    
  2. The command output should return the identification details available for the new guardrail:

    {
    	"guardrailId": "efgh5678efgh",
    	"guardrailArn": "arn:aws:bedrock:us-east-1:123456789012:guardrail/efgh5678efgh",
    	"version": "DRAFT",
    	"createdAt": "2024-07-11T12:37:48.329055+00:00"
    }
    
  3. Run update-agent command (OSX/Linux/UNIX) to re-associate the Amazon Bedrock agent that referenced the missing guardrail with the new (or an existing, active) guardrail. Use the --guardrail-configuration parameter to specify the new guardrail identifier and version. Important: update-agent performs a full replacement of the agent configuration (an HTTP PUT), not a partial update. The required parameters --agent-name, --agent-resource-role-arn, and --foundation-model must be re-supplied, and any other configured field you omit (--instruction, --idle-session-ttl-in-seconds, memory configuration, prompt override configuration, description, etc.) will be cleared or reset. Before running the command, use get-agent to retrieve the agent's current configuration, then re-supply every field you want to keep alongside the new --guardrail-configuration:

    aws bedrock-agent update-agent
      --region us-east-1
      --agent-id ABCDACBDAB
      --agent-name tm-project5-bedrock-agent
      --agent-resource-role-arn arn:aws:iam::123456789012:role/service-role/AmazonBedrockExecutionRoleForAgents_ABCDABCDABCD
      --foundation-model amazon.titan-text-premier-v1:0
      --guardrail-configuration 'guardrailIdentifier="efgh5678efgh",guardrailVersion="DRAFT"'
    
  4. The command output should return the configuration information available for the modified Bedrock agent:

    {
    	"agent": {
    		"agentArn": "arn:aws:bedrock:us-east-1:123456789012:agent/ABCDACBDAB",
    		"agentId": "ABCDACBDAB",
    		"agentName": "tm-project5-bedrock-agent",
    		"agentStatus": "UPDATING",
    		"guardrailConfiguration": {
    			"guardrailIdentifier": "efgh5678efgh",
    			"guardrailVersion": "DRAFT"
    		},
    		"updatedAt": "2024-07-11T15:09:45.425890+00:00"
    	}
    }
    
  5. Run get-guardrail command (OSX/Linux/UNIX) to confirm that the newly associated guardrail is active and reachable:

    aws bedrock get-guardrail
      --region us-east-1
      --guardrail-identifier efgh5678efgh
      --guardrail-version DRAFT
      --query 'status'
    
  6. The command output should confirm the guardrail status is READY:

    "READY"
    
  7. Repeat steps no. 3 - 6 for each Amazon Bedrock agent that referenced a missing or deleted guardrail, available in the selected AWS region.

  8. Change the AWS cloud region by updating the --region command parameter value and repeat the Remediation process for other regions.

References

Publication date Jul 13, 2026