Local Bedrock Testing

Test Amazon Bedrock without touching a real API

Thrubit intercepts every Bedrock call in your state machines and Lambda functions — returning instant, shaped mock responses.
ZERO API costs. Zero latency. Zero surprises.

Thrubit execution with Bedrock mock enabled, showing instant mock responses in the logs
$0
Bedrock API cost during dev
10+
Model families supported
Both
State machines & Lambda functions
1-click
Toggle mock on or off

Trusted by teams at

Every Bedrock iteration shouldn't cost money and take 30 seconds

Before Thrubit, every change to an AI-powered state machine meant a real model call — paying token costs, waiting for inference, and fighting throttle limits just to test your routing logic.

Before Thrubit

Pay per token. Wait per call.

Every test run hits the real Bedrock API — billing tokens, waiting 3–20 seconds for inference, risking throttle limits, and requiring valid AWS credentials just to verify your state machine routing and Lambda handler logic.

With Thrubit

Mock once. Run instantly. Pay nothing.

Flip the Bedrock mock toggle in Settings. Every invokeModel, converse, and retrieve call returns an instant, correctly-shaped response in under 200ms — so you can focus on your workflow logic, not your AWS bill.

Switch between real and mock Bedrock in seconds

The Bedrock mock is a global setting in Thrubit's AWS panel. Turn it on and every Bedrock call — whether it originates from a Step Functions native integration or from inside a Lambda function — is intercepted and returns a mock response immediately. No code changes. No environment variables.

  • Works for both Step Functions native Bedrock integrations (arn:aws:states:::bedrock:invokeModel) and direct SDK calls inside Lambda
  • The same toggle covers all Bedrock APIs in the same execution
  • Switch back to real AWS at any time — no restart required
  • Mock state is shown inline alongside each state node's log output
Mock Bedrock
Intercept all Bedrock API calls with local mock responses
Real AWS Mock
Mock SQS
Intercept sendMessage calls with mock MessageId
Real AWS Mock
Mock mode applies to the current execution immediately. No restart or code change needed.
MOCK RESPONSE
InvokeModel → claude-3-5-sonnet
Input
{
 "modelId":
  "claude-3-5-sonnet-20241022",
 "body": {
   "messages": [...]
 }
}
Mock Output
{
 "output": {
  "message": {
   "role": "assistant",
   "content": [{
    "text": "[Mock]..."
   }]
  }},
 "stopReason": "end_turn"
}

Mock responses that match the real Bedrock schema

Thrubit doesn't return a generic placeholder. Each mock response is shaped to match exactly what the real API returns for that model family — so your ResultSelector mappings, Lambda parsing code, and downstream state transitions all work exactly as they will in production.

  • Claude 3 / Nova responses include output.message.content[].text and stopReason
  • Titan Text returns results[].outputText with token counts
  • Knowledge Base retrieveAndGenerate returns full citations and output.text structure
  • Guardrail applyGuardrail returns action: "NONE" and coverage object
  • Stable Diffusion / Titan Image returns a valid 1×1 base64-encoded PNG artifact

Mocks wherever Bedrock is called — state machine or Lambda

Bedrock appears in two places in modern Step Functions architectures: as a native service integration in the ASL, and as a direct SDK call inside a Lambda function. Thrubit intercepts both.

  • ASL-level arn:aws:states:::bedrock:invokeModel task states are intercepted by the execution engine
  • Lambda-side calls via AWS.BedrockRuntime.invokeModel() are patched at the SDK prototype level before your handler runs
  • The same shaped responses are returned in both paths — your ResultSelector and handler parsing code both work correctly
  • No changes to your Lambda code required — the mock is injected transparently into the isolated process
State Machine

ASL Native Integrations

  • bedrock:invokeModel
  • bedrock:converse
  • bedrock-agent-runtime:retrieve
  • bedrock-agent-runtime:retrieveAndGenerate
  • bedrock:applyGuardrail
  • bedrock-agent:invokeAgent
Lambda SDK

Direct SDK Calls

  • BedrockRuntime.invokeModel()
  • BedrockRuntime.converse()
  • BedrockRuntime.retrieveAndGenerate()
  • BedrockRuntime.retrieve()
  • BedrockRuntime.applyGuardrail()
  • BedrockRuntime.invokeAgent()

Every major Bedrock model family, mocked correctly

Thrubit detects the model ID and returns a response shaped to that family's schema — so your parsing code and selectors work without touching the real API.

Claude (Anthropic)
claude-3-5-sonnet · claude-3-haiku · claude-2 · claude-instant
Returns output.message.content[].text with stopReason: "end_turn" and usage tokens. Legacy Claude 2 returns completion field.
Nova (Amazon)
amazon.nova-pro · amazon.nova-lite · amazon.nova-micro
Returns the Nova Converse-compatible output.message structure with stopReason and usage object matching production format.
Titan Text (Amazon)
amazon.titan-text-express · titan-text-lite · titan-text-premier
Returns results[].outputText with tokenCount and completionReason: "FINISH" matched to the Titan Text schema.
Llama (Meta)
meta.llama3 · meta.llama2 · llama-3.1 · llama-3.2
Returns generation, prompt_token_count, generation_token_count, and stop_reason: "stop" per the Llama bedrock schema.
Mistral
mistral.mistral-7b · mistral-large · mixtral-8x7b
Returns outputs[].text with stop_reason field shaped to the Mistral Bedrock response format.
Cohere
cohere.command · command-light · command-r · command-r-plus
Returns generations[].text with likelihood and finish_reason: "COMPLETE" per the Cohere Command schema.
Image Models
stable-diffusion · amazon.titan-image-generator
Returns a valid base64-encoded 1×1 transparent PNG inside artifacts[].base64 with finishReason: "SUCCESS" — parses correctly downstream.
Knowledge Bases & Agents
retrieveAndGenerate · retrieve · invokeAgent
Returns full citations array, output.text, and sessionId for RAG flows. Agent responses include completion and sessionState.

Up and running in under a minute

No code changes, no environment variables, no AWS credentials required to use mock mode.

Open Settings → AWS

In Thrubit, open the Settings panel and navigate to the AWS tab. You'll see the Bedrock and SQS mock toggles alongside your AWS profile and region configuration.

Enable Bedrock mock

Flip the Bedrock toggle from "Real AWS" to "Mock". The change takes effect immediately — no restart needed. Run your state machine or invoke your Lambda just as you normally would.

Build and iterate freely

Every Bedrock call returns an instant mock response shaped to the correct model schema. Build your routing logic, test error handling, and validate your ResultSelector — all at zero API cost.

Switch back when ready

When you're ready to validate against the real model, toggle back to "Real AWS" and run again. Because your parsing code was working against the correctly-shaped mock, it works against the real API too.

Stop burning tokens to test your workflow logic.

Download Thrubit and run your first Bedrock-powered state machine locally in under five minutes — at zero cost, with full mock responses for every model family.

What teams are saying

Real feedback from engineers, trainers and decision makers.

★★★★★

“Thrubit cut our Step Functions debugging cycle from 15 minutes per iteration down to seconds. The visual trace is worth the price alone. It’s become an essential part of our development workflow.”

Photo of Senior Software Engineer
Kim V.
Software Engineer at Cozy Code Creations
★★★★★

“I was looking for ways to make Step Functions and Lambdas more tangible for students. Thrubit makes it significantly easier to visualize workflows and experiment locally, accelerating real understanding.”

Photo of Certified AWS Trainer
John L.
Certified AWS Trainer
★★★★★

“Thrubit saves us over $24k a year & protects us from surprise AWS bills. One rogue state machine once cost us 10x our typical month. With Thrubit, that risk is gone and our developers iterate faster.”

Photo of Co-Owner at WordHerd
Lisa H.
Co-Owner at WordHerd
Free Trial