Skip to content

Red Teaming Amazon Bedrock Models via AccuKnox Collector method

AccuKnox supports cloud-based onboarding to scan and red team every model deployed across an AWS Bedrock account. The Collector method is a lighter alternative for targeting a specific model on Bedrock without onboarding the entire cloud account or organization.

Why use the Collector method

  • Targeted scope: Red team a single Bedrock model instead of every model in the account.
  • No account onboarding needed: Works directly against the model's inference endpoint using a Bedrock API key.
  • Fast setup: A single Custom Model collector covers the connection, prompts, and schedule.
  • Flexible: The same flow works for any LLM exposed over an HTTP endpoint, not just Bedrock.

Prefer full-account coverage?

To scan every Bedrock model in an account automatically, use the AWS AI/ML Onboard flow instead.

Prerequisites

  • An AWS account with access to Amazon Bedrock and the model you want to red team.
  • Permission to generate a Bedrock API key (short-term or long-term) in the target region.
  • Access to the AccuKnox tenant with permission to create Collectors.

Step 1: Start a new LLM Red Teaming collector

  1. Go to Settings > Collectors in the AccuKnox console.
  2. On the LLM Red Teaming card, open the dropdown and select Custom Model.

Select Custom Model under LLM Red Teaming

  1. Enter a Collector Name and Description, then click Next.

Basic information for the Bedrock collector

Step 2: Gather the Bedrock model details

The Configure Target step requires four values from the AWS console: Model Name, Model ID, Endpoint URL, and Secret Token.

Find the Model ID and inference region

  1. In the AWS console, open Amazon Bedrock > Model catalog.
  2. Select the model you want to red team (for example, Claude Haiku 4.5).

Browse the Bedrock model catalog

  1. On the model card, copy the Model ID. Also note the inference region, as it is part of the endpoint URL.

Model details with the Model ID

Generate a Bedrock API key

Setup paths for making API calls to Amazon Bedrock

Bedrock supports two key types. A short-term key expires after 12 hours (tied to your console session). A long-term key has a custom expiry and is recommended for repeated or scheduled scans.

  1. In the Bedrock console, open API keys.

Bedrock API keys page

  1. Click Generate long-term API keys, set an API key expiration, and click Generate. Copy the key; this is your Secret Token.

Generate a long-term Bedrock API key

Build the Endpoint URL

Use this template, replacing <region> and <model-id> with your values:

https://bedrock-runtime.<region>.amazonaws.com/model/<model-id>/invoke

Example for Claude Haiku 4.5 in us-east-1:

https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-haiku-4-5-20251001-v1:0/invoke

See the AWS guide on using Bedrock API keys for additional invocation options.

Step 3: Configure the target

Fill in the parameters on the Configure Target step.

Configure Target for the Bedrock model

Parameter Description
Endpoint URL The Bedrock runtime URL built above, for example https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-haiku-4-5-20251001-v1:0/invoke
Secret Token The Bedrock API key generated above
Model Name A display name used inside AccuKnox, for example Claude Haiku 4.5
Model ID The Bedrock Model ID, for example anthropic.claude-haiku-4-5-20251001-v1:0
Model Type Set to custom
Request Template JSON payload sent to the model. Place $INPUT where the red teaming prompt should be injected.
Scan Category One or more of Code, SentimentAnalysis, Hallucination, PromptInjection, or All
Pre-defined Prompts Default Prompts uses the built-in AccuKnox corpus. Custom Prompts lets you upload your own JSON list.

Request template for Anthropic models on Bedrock

Anthropic models on Bedrock require an anthropic_version field in the request body. Use this template:

{
  "anthropic_version": "bedrock-2023-05-31",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": [
        { "type": "text", "text": "$INPUT" }
      ]
    }
  ]
}

Other providers

Bedrock hosts models from Anthropic, Meta, Amazon Titan, Mistral, and others. Each provider expects a different request shape. Copy the Code example from the model card for your specific model and replace the prompt value with $INPUT.

Pick scan categories

Select the categories to exercise against the model. You can pick more than one.

Choose one or more scan categories

Step 4: Test the connection

Click Test Connection. A successful response confirms the endpoint, key, and request template are correct before saving.

Test Connection succeeded for the Bedrock model

Step 5: Schedule and submit

Add Labels and Tags to organize the collector. Then pick a trigger type:

  • On-Demand: Trigger the scan manually from the Collectors list.
  • Scheduled: Set a cron expression. AccuKnox previews the next run time in both UTC and your local timezone.

Enter the notification email and click Submit.

Configure schedule and notification

Step 6: Trigger the scan

The collector appears in the Collectors list with its trigger type, deployment status, and findings count. For an On-Demand collector, open the row menu and click Trigger Scan.

Trigger an on-demand scan

A confirmation appears once the scan starts.

Scan triggered successfully

View the findings

Once the scan completes, click the Findings count on the collector row to open the AI Red Teaming findings view.

Bedrock red teaming findings

Each finding shows:

  • Scan Category and Probe that produced the result.
  • Detector and Goal the probe was checking.
  • Prompt sent to the model and the model's Output.
  • Risk Factor, Detector Safety Score, and Category Safety Score.

Click any row to open the detail pane with the full prompt, model response, AVID mapping, and recommended remediation. You can also use Ask AI for assisted remediation or raise a ticket directly from the pane to track the fix in your ticketing system.

Probes and subprompts

For the full catalog of probes and categories used during scanning, see Categories and Probes.