Amazon’s AI Hacking Report: Test Your Agent’s Off Switch

▶ Watch the video version of this article
Your AI agent drafts an invoice, updates a CRM record, and queues a customer email. Then you spot the wrong account in its work. Clicking Pause feels like the obvious response—but does it stop the job already running, the retry waiting in a queue, and the email another service is about to send?
Amazon’s report on AI-assisted hacking makes that question more urgent, not because a business assistant is the same as an attacker’s agent, but because both can carry a task forward without step-by-step human direction. Here’s exactly how I’d test the off switch before giving an automation more access.
What Amazon reported—and what it does not prove
Amazon reported that an attacker gave Cairn AI agents an objective—obtain shell access—rather than directing every action. In one case, Amazon says the agents went from mapping an application’s API to writing files at arbitrary server locations in about 11 minutes. A root reverse shell came in a later session, not within that reported interval.
The Amazon security report is worth reading with its qualifications intact. Amazon assessed with high confidence that the vulnerability was a zero-day when the agents found it. It attributed the operation to a Chinese-nexus threat actor with moderate confidence. Humans supplied the initial objective and targets, and a human operator intervened after the discovery to direct further targeting. A separate attempt against a Redis target ran for roughly 16 hours, involved 148 sequential agent actions, and did not succeed.
The affected project’s MONAI Label advisory identifies versions through 0.8.5 as affected by a path-traversal flaw and 0.8.6 as patched. If you operate that software, follow the project advisory rather than treating a workflow shutdown drill as a substitute for patching.
The business-automation lesson is narrower than the attack headline. Amazon did not publish a shutdown procedure for your invoice agent. It did show why an objective-driven system deserves operational controls: once you authorize an agent to use tools, you need to know which actions it can still take after you tell it to stop.
Consider a legitimate workflow:
Incoming customer email
→ identify account
→ look up CRM record
→ prepare invoice draft
→ update follow-up status
→ queue reply for approval
Nothing in Amazon’s report establishes that this ordinary workflow can reproduce the attack. The shared engineering problem is that one step can trigger another across systems you do not stop with a single API call.
Define “stop” before you build the button
An agent’s off switch is a set of controls with different scopes, not necessarily one button. A useful shutdown can block new jobs, prevent queued work from resuming, interrupt active work where the platform supports it, restrict future access, and show what already happened. It cannot assume that a completed external action will be undone.
Write the scope down for each control you have:
| Control | What it may stop | What you must still check |
|---|---|---|
| Disable the trigger | New jobs from that trigger | Jobs already running or queued elsewhere |
| Stop an agent session | Work in the specified session | New invocations and downstream services |
| Cancel a workflow execution | Remaining workflow steps | Integrated tasks that may not cancel |
| Revoke a credential | Use of the affected credential | Other credentials and newly granted access |
| Block an action at your integration layer | Future actions that pass through that layer | Actions already sent or paths that bypass it |
These differences are documented, not hypothetical. AWS says StopRuntimeSession terminates the specified active AgentCore Runtime session and stops ongoing streaming responses. Its session documentation also says that session can become active on its next invocation. Session termination is therefore not permanent disablement.
Likewise, AWS Step Functions documents a “best-effort” attempt to cancel an aborted integrated task; cancellation can fail. AWS IAM documentation says revoking active role sessions denies permissions to credentials issued before the revocation point, but does not prevent a new role session from being assumed afterward. Zapier documents that switching off a Zap while it is running can stop a task and directs users to inspect the affected run in Zap history.
For an owner, the operational question is simple: After I press stop, which actions can still reach a customer or change a business record? Ask whoever maintains the automation to answer that for every connected app, not just for the agent dashboard.
Put the stopping rule at the action boundary
The most dependable place to enforce a stop is immediately before an external action, through a path every such action must use. Stopping the model from generating more text is insufficient if a worker has already queued an email, a retry, or an invoice API call.
I would map an email-to-invoice workflow into states before wiring up customer-facing permissions:
received
→ account_matched
→ invoice_drafted
→ awaiting_approval
→ approved
→ invoice_issued
→ customer_notified
The first states prepare work. The later states affect the outside world. That boundary is where a stop check and an approval check matter most.
For each external action, record:
- Which job requested it: a stable job identifier that also appears in the queue and audit log.
- Which workflow it belongs to: so disabling that workflow blocks its waiting jobs, not just its current worker.
- Whether approval is required: a draft is not permission to issue an invoice.
- Whether it was attempted or completed: those are different facts during a timeout.
- How to reconcile uncertainty: if the API response is lost, inspect the destination before retrying.
NIST’s AI Risk Management Framework material identifies real-time monitoring and the ability to shut down or intervene in a deviating AI system as safety approaches. That is useful design guidance, not a claim that a particular stop-button implementation is required for every small business.
A practical implementation has a durable workflow status and an action gateway. Before the gateway sends an email, issues an invoice, or changes a CRM field, it checks whether the workflow remains enabled and whether the action has approval. When someone stops the workflow, new jobs are rejected and queued jobs fail that same check when they wake up.
There is a race to handle: the stop request may arrive while an external API call is being sent. Your control can prevent a later action; it cannot reliably recall a request the destination already accepted. Use request timeouts, keep a record of in-flight actions, and reconcile the destination’s actual state. A correction may be necessary if an invoice or email already went out.
A small runnable stop-state test
You can examine the core stopping rule without involving an LLM. The Python sketch below puts a stop-state check near an invoice action. Run it locally and inspect its output to verify the behavior of this sketch; check your automation platform’s queue, worker history, and connected invoice system to establish what happens in your actual workflow.
from dataclasses import dataclass
from threading import Lock
@dataclass
class Job:
job_id: str
approved: bool = False
draft_ready: bool = False
class Workflow:
def __init__(self):
self._lock = Lock()
self._stopped = False
self.jobs = {}
self.issued_invoices = []
self.audit = []
def prepare_draft(self, job_id):
with self._lock:
if self._stopped:
raise RuntimeError("Workflow stopped")
job = Job(job_id=job_id, draft_ready=True)
self.jobs[job_id] = job
self.audit.append((job_id, "draft_ready"))
return job
def approve(self, job_id):
with self._lock:
if self._stopped:
raise RuntimeError("Workflow stopped")
self.jobs[job_id].approved = True
self.audit.append((job_id, "approved"))
def stop(self):
with self._lock:
self._stopped = True
self.audit.append(("workflow", "stopped"))
def issue_invoice(self, job_id):
# Check the stop state when this method is called.
with self._lock:
if self._stopped:
self.audit.append((job_id, "blocked_after_stop"))
return False
job = self.jobs[job_id]
if not job.draft_ready or not job.approved:
self.audit.append((job_id, "blocked_without_approval"))
return False
# Test stand-in for an external invoice API call.
self.issued_invoices.append(job_id)
self.audit.append((job_id, "invoice_issued"))
return True
workflow = Workflow()
workflow.prepare_draft("test-job")
workflow.stop()
assert workflow.issue_invoice("test-job") is False
assert workflow.issued_invoices == []
print(workflow.audit)
Treat the assertions and printed audit as checks to run, not as evidence about a live invoice system. Inspect the local output to see what the example records after the stop. To verify what a queued or retrying job would do, test that path in the automation platform you use and inspect its run history alongside the invoice destination.
Do not copy this in-memory class into production and call the problem solved. A real stop state must survive worker restarts and be visible to every worker. An external API call must have its own outcome record. Holding a local lock cannot atomically commit both your database state and a third-party invoice. If a call times out, you may not know whether it succeeded until you inspect the invoice system.
The testable requirement remains useful even when the implementation changes: a stopped job must not start another customer-facing action, including one attempted by a retry worker. Add a separate reconciliation path for actions already in flight.
Run a shutdown drill against the real destinations
A shutdown drill passes only if you check the connected systems, not merely the automation dashboard. Use test records and a sandbox or draft destination wherever available; keep customer-facing sends out of the test.
Start with one workflow and write its path in plain language:
Trigger: test customer email arrives
Prepared action: invoice draft appears in review queue
Approval point: person approves the draft
External actions: invoice issuance, CRM update, customer email
Stop point: after the draft, before approval
Then run the job and invoke the same stop control an owner would use during an incident. Check each destination directly: Is there only a draft, or was an invoice issued? Did the CRM change? Did an email leave? Look at the queue and retry history, then let any waiting test work attempt to resume.
Record both outcomes separately:
| Question | Pass condition |
|---|---|
| Can a new trigger start another job? | No, while the workflow is stopped |
| Can the active job take another external action? | No further action observed after the stop, subject to any already in-flight request |
| Can queued or retrying work resume external actions? | No; it encounters the stopped state |
| Can an owner see what completed? | Yes; the audit trail distinguishes draft, attempt, completion, and blocked action |
| Can the workflow restart accidentally? | No unexpected restart through another trigger or credential path |
If a test reveals an action that already completed, do not label the drill a failure merely because the switch cannot reverse time. Label the action accurately, identify the correction procedure, and decide whether the stop needs to happen earlier in the workflow.
Also test who can reactivate the system. A stopped runtime session, a disabled trigger, and revoked credentials each have different reactivation paths. Your runbook should name the person who can restore service and the checks they perform first. NIST’s incident-readiness guidance discusses shutdown policies for unintended activity and revoking credentials accessed during an incident. That document addresses superintelligence training and evaluation; use it as a prompt to think through controls, not as a small-business compliance rule.
Where this fits in my work
I build practical AI automations for solopreneurs and small teams. For any integration that moves from preparing work to changing records or contacting customers, identify an approval point, make it possible to inspect what happened, and test the stop procedure against the connected apps—not just a dashboard control that says “paused.”
Want more like this?
I’m Lazar Milićević, a senior engineer who builds practical AI automations for solopreneurs and small teams.
Start with the stop-state test above, then verify the same behavior against each connected app before allowing customer-facing actions.
Frequently asked questions
Why does a stop control matter for an AI-powered business workflow?
An AI-powered workflow can carry a task across several connected systems. For example, it might read a customer email, look up an account, update a CRM, and prepare an invoice. A mistaken action at one step can become input to the next. A stop control matters because the workflow should not keep taking actions merely because another integration is available.
How do I test whether an automated workflow really stops?
Run a shutdown drill with test data and a sandbox or draft destination. Record the workflow’s trigger, actions, results, and approval point. Start a test job, stop it before approval, then check whether any email left, invoice was issued, or CRM record changed. Check queued retries as well. The test passes if the stopped job takes no further external actions and you can see what completed before the stop.
When is a pause button not enough to stop an AI workflow?
A pause button may stop new jobs while an active worker continues. Revoking one credential may also leave another connection active, and queued work may retry later. To assess a stop control, check what happens to new work, active work, and retries—not just whether a dashboard says “disabled.” Work already completed, such as a sent email, may need a separate correction.