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. Choose Edit in Agent Builder from the top menu to access the configuration settings available for the selected Bedrock agent.

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

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

  8. Search for the guardrail name noted at step 6 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.

  9. 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.

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

  11. 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 get-agent command (OSX/Linux/UNIX) with the ID of the Amazon Bedrock agent that you want to examine as the identifier parameter and custom output filters to describe the ID of the Bedrock guardrail attached to the selected agent:

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

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

    If the get-agent command output returns null, there is no guardrail associated with the selected Amazon Bedrock agent, 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.

  5. 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
    
  6. 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 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 no longer exists, therefore the agent is unprotected, even though it has a guardrailIdentifier value configured.

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

  8. Change the AWS cloud region by updating the --region command parameter value and repeat steps no. 1 - 7 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