Bedrock AgentCore Fault Tests Need More Than Healthy Requests
Bedrock AgentCore fault experiments test canceled and corrupted tool results; I map the runtime isolation, validation, and alert checks worth implementing.
- Topic
- AI
- Reading time
- 9 min
- Length
- 1,862 words
- Published
- Nov 19, 2026
03:37 pm IST
In this article
- What changes inside the agent
- Timeouts and corrupted results test different promises
- What did the prompt change in the experiment?
- Building a dedicated AgentCore chaos runtime
- Validate returned data before trusting the answer
- Alarm on failed tasks, not the injected symptom
- Schema-valid output still leaves an evidence gap
Bedrock AgentCore resilience testing can now use AWS Fault Injection Service to activate tool-level faults in a deployed Strands agent. That takes chaos testing beyond offline runs: the experiment cancels tool calls or corrupts their results while the runtime continues serving requests. The part I care about is whether the agent admits that evidence is missing. Keeping an endpoint available is a different test. I would run this in a dedicated chaos runtime, not in production.
The AgentCore fault-injection walkthrough makes that distinction uncomfortable. Every invocation returned HTTP 200. CloudWatch error metrics stayed at 0.0. Neither changed when tool calls were canceled or corrupted. That is why I would put answer quality and failure communication at the start of the acceptance criteria, ahead of whether the request itself succeeded.
What changes inside the agent
AWS FIS runs an SSM Automation action that enables fault injection, leaves it enabled for a configured duration, and then disables it. The faults occur immediately before or after a tool call inside the agent. The thing under test is the agent's response to impaired tools—not the network or infrastructure around it. There is no redeployment step when starting or stopping an experiment.
Loading the fault machinery and activating it are separate decisions. Adding plugins=chaos_plugins() to the agent constructor makes injection possible; it does not, by itself, turn injection on. Parameters under /chaos/{runtime_id}/ control whether injection is active, which tools it affects, and the fault rate. The runtime reads those settings on invocation, with a 10-second cache.
I like that separation. I would not, though, mistake an inactive configuration for production isolation. AWS's explicit production guidance is to omit both the chaos plugin and its parameter-read access. In a deployment review, I would check the runtime artifact and its execution role, rather than stopping after checking that injection is switched off.
Timeouts and corrupted results test different promises
Pre-hook faults cancel a tool call before it executes and return an error instead. The available effects are timeout, network_error, execution_error, and validation_error. These give me a way to test whether the agent retries, takes another route, or acknowledges that it cannot complete the task. The failure is explicit. What matters next is what the agent does with it.
Post-hook faults work differently: the tool executes, then its response is changed. The effects are truncate_fields, remove_fields, and corrupt_values. A completed call can therefore hand the agent damaged data. I would make this a separate acceptance test, not treat it as a harder setting on the timeout test. Detecting an explicit error and recognizing an apparently successful but unusable result are different responsibilities.
For AI-assisted editorial workflows, I would test this boundary first. A missing lookup needs to remain missing evidence, rather than become an invitation to finish a summary from model knowledge. That is the design requirement I would write down. It is not a result I am claiming from our newsroom systems, and I would not want the distinction lost in a discussion of the test.
What did the prompt change in the experiment?
The example used a Pokémon advisor with get_pokemon and get_move tools. AWS compared configurations whose only difference was the system prompt. Each configuration ran five times with get_move timing out and fault_rate=1.0. That makes the prompt difference worth looking at, rather than treating all the runs as one batch.
Without the failure-handling instruction, the agent answered from prior training knowledge in every run. With the instruction, it named the missing data in every run. There was a tool-call difference too: the unprompted configuration used about 1.35 times as many calls on average, and its worst run reached 2.5 times the unfaulted baseline.
Corruption was harder to detect. Fourteen of fifteen unprompted corruption runs produced confident answers without acknowledging degraded data. All five prompted runs declined and identified invalid data. I find those results useful, but I would stop well short of calling them a reliability guarantee for another model, prompt, or tool contract. The prompt remains a probabilistic mitigation, even with that clear difference between the tested configurations.
I would write the expected failure behavior before running the tests, then keep testing it. I would also separate a useful retry from repeated work that eventually ends in an unsupported answer. More tool calls do not make that answer acceptable. The agent trying harder is not the outcome I am trying to approve.
Building a dedicated AgentCore chaos runtime
I would introduce this as a bounded test capability, with the expected outcome written down for each scenario. The setup needs the integrated Strands agent and dependencies, the target runtime ID, the ChaosExperiment SSM Automation document, and the FIS experiment template. The walkthrough's artifacts include the controller and role policies, so those belong in the setup review too.
- Separate the deployment boundary. I would deploy the chaos-enabled agent independently. Then I would verify that production contains neither
chaos_plugins()nor read access to/chaos/*. An inactive setting would not be enough for this check. - Review role responsibilities. FIS needs its trusted role. SSM Automation needs permission to write and delete the chaos parameters, while the chaos runtime needs permission to read them. I would use the artifact's least-privilege policies, not invent a shared administrative role to cover all of those jobs.
- Write the hypothesis before enabling faults. I would specify the acceptable user response, retry behavior, notification deadline, and recovery signal. Those would be requirements for the application being tested, not arbitrary thresholds copied from another team because they were already written down.
- Start with one tool and a low fault rate. I would inject a timeout first and inspect the actual responses. Only then would I expand the test into response corruption; I would want to see what happened in the simpler case before moving on.
- Verify that injection actually happened. The
fault_injectionskeys must exactly match registered tool names. Otherwise, an experiment can complete without having injected anything. Completion alone would not convince me that the fault was exercised.
The controller writes fault_rate, fault_injections, and execution_id before setting active=true. Shutdown reverses the emphasis: it disables activity first, then waits for the cache to drain. Cancellation and failure handlers use that same disable path. I would review the shutdown behavior explicitly. A successful start is only part of what I would want to approve.
I would keep that review separate from centralizing MCP tool access. My access review asks whether the agent may call a tool at all. This experiment asks what the agent does when a tool it is permitted to call fails. I want evidence for both boundaries, without letting a pass on one stand in for a pass on the other.
Validate returned data before trusting the answer
One mitigation is a tool-observability plugin on the Strands AfterToolCallEvent hook. The plugin validates tool results against a Pydantic contract and emits an Embedded Metric Format log entry. CloudWatch can create metrics from that entry for alarms. That gives the validation check a place in monitoring, rather than leaving it only in the returned conversation.
I would begin with a small contract covering the data the agent actually needs. The illustrative model below uses the fields and constraints from the walkthrough. It is not the complete plugin, and I would read it as a validation example rather than the whole implementation:
from pydantic import BaseModel, Field
class PokemonToolResult(BaseModel):
name: str = Field(min_length=4)
pokedex_id: int = Field(ge=1)
types: list[str]
None of the fields has a default, so missing fields fail validation. The name constraint catches the demonstrated truncation from mamoswine to mam. The ID constraint rejects values below the declared minimum. I would choose these constraints from the actual tool contract; copying Pokémon rules into business data would miss the point of writing the contract in the first place.
My next review question would be: which invalid values still pass? A positive but incorrect identifier is not rejected by a minimum bound. A sufficiently long but incorrect name is not rejected by a length check either. I would document that gap explicitly. Contract validation provides evidence about declared requirements; it does not prove that every fact in the returned data is true.
Alarm on failed tasks, not the injected symptom
A gracefully handled tool error can be invisible to infrastructure monitoring. That is exactly what happened in the experiment. The runtime stayed healthy while the agent's evidence was broken. I would keep availability monitoring, but I would not use it as the pass condition here. A healthy runtime and an acceptable answer are not the same result.
For stop conditions, AWS's guidance favors customer-impact signals such as task success, rather than the tool-error metric that the experiment is intentionally increasing. I would separately record whether the fault fired, whether the answer remained acceptable, and whether the intended alert reached operations. Those are different questions. I would want the test record to answer each of them, not collapse them into a single success flag.
I would review transcripts across repeated runs, rather than approve a scenario after one good response. For repeatable scoring, the Strands Evals SDK includes FailureCommunicationEvaluator, RecoveryStrategyEvaluator, and PartialCompletionEvaluator. I would use those scores alongside examples of unacceptable output. The scores would not replace the work of defining success for the task being tested.
I would also check the interface: how does it present a refusal or a partial result? That is where my thinking about agent-ready interfaces meets this experiment. I would want the UI to preserve the distinction between unavailable evidence and a completed answer, rather than lose that distinction at the point where the user sees the result.
Schema-valid output still leaves an evidence gap
Structured outputs and strict tool use for recent Claude models constrain what the model emits, including final answers and tool arguments. They do not establish that a tool returned correct data. An answer can satisfy its schema and still rest on a timeout or a corrupted result. The demonstrated length and range constraints are not enforced server-side either. I would keep those limits visible when reviewing what a schema-valid response actually proves.
I would keep output formatting, tool-result validation, and failure-handling instructions as separate checks. They address different parts of this problem. Amazon Bedrock Guardrails, including content filtering and contextual grounding checks, are complementary protections. I would not treat their presence as a reason to skip the fault experiments or fold these checks into a single approval.
The scope has a limit too. These hooks test agent behavior around tool calls; they do not test network resilience itself. If infrastructure failure were the immediate concern, I would not present this experiment as coverage for it. I also would not adopt this exact setup unchanged for an agent outside Strands on AgentCore. Those are boundaries I would put in the test plan, not leave implicit.
I would start with a dedicated runtime, a single canceled tool call, and an explicit definition of an honest answer. My approval would depend on the agent communicating the missing evidence and operations being able to detect the failed task, even while the endpoint looks perfectly healthy. Once that canceled-call behavior is tested, I would add corrupted results and inspect the answers again.
Sources
Resilience testing your agents on Amazon Bedrock AgentCore
This is the source this article is based on. Many articles on this blog are drafted with AI and checked against their source automatically; the editorial policy explains how, and how to report a mistake.
Frequently asked
Should I run these faults against my production agent?
No. AWS recommends a dedicated chaos runtime. I would verify that production omits chaos_plugins() and has no read access to /chaos/*, rather than relying only on inactive fault settings.
Do structured outputs remove the need to validate tool results?
No. Structured outputs constrain model emissions, not the correctness of data returned by tools. I would validate tool results separately and test how the agent responds when that validation fails.
Can this experiment test an agent that does not use Strands?
The demonstrated integration uses Strands chaos plugins on an AgentCore runtime. I would reuse the testing goals elsewhere, but I would not assume these artifacts work unchanged with another agent SDK.
Why can an experiment finish without injecting any faults?
The fault_injections keys must exactly match the agent's registered tool names. A mismatch can let the experiment complete without affecting a tool, so I would verify observed injection before judging agent behavior.
Weekly newsletter
Liked this? Get the next one by email
One short email a week with new articles on React, Node.js, TypeScript and AI engineering. No spam. Unsubscribe in one click.
Further reading
Related tutorials from ByteMuni, my developer publication.
- Cyber SecurityOpenAI finds 948 Linux root flaws, but fixes need reviewOpenAI’s Linux kernel research produced 948 unique root-escalation findings; the useful lessons are patch status, exploit validation and safer review.
- AWS & CloudAWS Lambda Web Functions: A Developer Guide to Lambda Without HandlersAWS Lambda Web Functions let your Node.js server listen on a port and serve up to 128 requests per warm environment, billed on active CPU. This developer guide covers the new programming model, the launch limits, deploys and canaries, pricing checked against AWS's own examples, and the gotchas early adopters have already found.
- AI & Machine LearningIs AI a Bubble? How to Tell a Boom From a Bubble Parts of the AI market show classic bubble signs, but the technology is in real, paid use. Here is a five-sign test, an honest dot-com comparison, three burst scenarios and what it means for developers.