Show HN: Sample-incident-response-agent, open-source AI agent from AWS CIRT AWS released Sample-incident-response-agent, an open-source agentic AI assistant that triages suspected AWS security events through a six-phase investigation workflow and maps findings to the Threat Technique Catalog for AWS (TTC) and MITRE ATT&CK. The agent is read-only by design, with permissions enforced by the IAM credentials it is given, and runs as a stdio MCP tool server with eight read-only tools including evidence_search, evidence_aggregate, query_state, list_findings, dns_search, network_search, s3_access_search and catalog_lookup, plus adapters for Kiro Crew and the OpenAI Codex CLI. AWS describes the release as sample code for learning and experimentation, and the agent presents every assessment and stakeholder message as a draft for human review. An agentic AI assistant that triages suspected AWS security events. Given a reported event, the agent performs evidence-based triage: it works through a six-phase investigation workflow, maps findings to the Threat Technique Catalog for AWS TTC https://aws-samples.github.io/threat-technique-catalog-for-aws/ and MITRE ATT&CK, separates confirmed facts from inference, and produces a triage assessment for an analyst to review. The agent is designed to be read-only and analyst-in-the-loop . Permissions are enforced by the AWS credentials you give it. It presents every assessment and stakeholder message as a draft for a human to review. This is sample code, provided for learning and experimentation. Review it, and test it in your own environment, before using it in an investigation. - Evidence-based, not narrative-driven. It treats denied API calls and missing telemetry as evidence, builds an indicator matrix, and bounds the blast radius with explicit negative findings, rather than stopping at the first plausible story. - Read-only by design, enforced by IAM. Run the agent with a read-only IAM role or user see docs/IAM-POLICY.md https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/IAM-POLICY.md . AWS has implicit deny for actions, regardless of what any code does. On top of that, the live backend calls only read APIs, and the agent is limited on your machine: the Kiro Crew adapter denies file writes and shell commands, and in Codex you can enforce the same with a read-only sandbox. - Works with your agent host. The core is a stdio MCP tool server plus a methodology prompt and output schemas. Adapters for Kiro Crew and the OpenAI Codex CLI are included, and any MCP-capable host can use the tool server. - Offline or live. Investigate the bundled sample incident with no AWS account, or point the agent at a live AWS account. It uses the same tools and methodology either way. Given a suspected security event, the agent works through six phases: 1. Case Intake 2. Environment Baseline 3. Indicator Analysis 4. Scope Determination 5. Triage Assessment 6. Documentation & Handoff Run as a Kiro Crew bot see below run-it-autonomously-as-a-kiro-crew-bot , it works Phases 1 through 5 on its own and pauses only for a decision or to approve the final write-up. Driven directly by an analyst instead, it pauses at each phase boundary for review. Either way it calls tools to gather and correlate evidence, reasons about behavioral anomalies, maps activity to threat techniques, and writes up a verdict with severity, root cause, visibility gaps, and prioritized remediation. - Investigation tools tools/ : an MCP server with eight read-only tools: - evidence search : search CloudTrail events - evidence aggregate : count CloudTrail events by principal, IP, event, region, or service - query state : list IAM users, access keys, and roles, EC2 instances, and S3 buckets - list findings : list Amazon GuardDuty findings - dns search : search Amazon Route 53 Resolver DNS query logs - network search : search Amazon VPC Flow Logs - s3 access search : search Amazon S3 server access logs - catalog lookup : map CloudTrail events to TTC and MITRE ATT&CK techniques The DNS, flow-log, and S3-access tools return data when the evidence bundle includes those sources. A backend that doesn't provide a source the live AWS backend does not collect these today reports it as a visibility gap rather than failing, so the agent treats a missing source as something to flag, not as proof the environment is clean. Evidence results include the AWS account ID the evidence comes from, so the agent can stop if it's connected to the wrong account. - Workflow workflow/ : the six-phase methodology prompt, output schemas, and communication guidelines. - Technique catalog catalog/ : public TLP:CLEAR entries from the Threat Technique Catalog for AWS, plus a few MITRE ATT&CK techniques the TTC doesn't cover, with detection and mitigation guidance. - Sample evidence evidence/sample-incident/ : a scrubbed, multi-stage incident you can investigate offline. All account IDs, access keys, and IP addresses in it are placeholders or reserved documentation values. - Evaluation evaluation/ : an expert answer key and a scorer that grades an investigation report on four dimensions. - Host adapters adapters/ : setup for Kiro Crew adapters/kiro-crew/ and the OpenAI Codex CLI adapters/codex/ . The Kiro Crew adapter also includes an optional autonomous bot adapters/kiro-crew/bot/ that runs an investigation end to end and dispatches parallel read-only workers. - Launcher bin/sec-tools-server.sh : starts the tool server reliably from any MCP host see Connect to an MCP host connect-to-an-mcp-host . - Git https://git-scm.com/downloads , to clone the repository. - Node.js https://nodejs.org/ 22 or later, which includes npm . Check your version with node --version . Node.js 20 and earlier are past end of support https://nodejs.org/en/about/previous-releases and no longer receive security updates. - An agent host to drive the investigation: Kiro Crew https://kiro.dev/docs/crew/ or the OpenAI Codex CLI https://github.com/openai/codex . See the adapter guides below. Both hosts require you to sign in to them on first use with your own account , and each has its own setup: - Kiro Crew also needs Python 3 https://www.python.org/downloads/ for the installer. On first launch the dashboard walks you through installing the Kiro CLI and completing sign-in; see the Kiro Crew installation guide https://kiro.dev/docs/crew/installation/ . - OpenAI Codex CLI needs its own sign-in to a Codex account; follow its install instructions https://github.com/openai/codex quickstart . For live investigation of an AWS account, you also need: - An AWS account and credentials. We recommend least-privilege, read-only credentials see docs/AUTHENTICATION.md https://github.com/aws-samples/sample-incident-response-agent/blob/main/docs/AUTHENTICATION.md . - The AWS Command Line Interface AWS CLI https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html , to set up a credentials profile and confirm which account it uses. Clone the repository, then install, build, and test: git clone https://github.com/aws-samples/sample-incident-response-agent.git cd sample-incident-response-agent npm install npm run build npm test All tests should pass. Start the tool server against the sample incident. It needs no credentials and no network access: SEC BACKEND=local \ SEC BUNDLE=./evidence/sample-incident \ npm start The server prints tool-server ready backend=local, ... and then waits for an MCP client to connect over stdio. Press Ctrl+C to stop it. To run an investigation, connect an agent host see Run it in an agent host run-it-in-an-agent-host . The offline backend reads any directory you point SEC BUNDLE at, so you can investigate your own exported logs the same way — without giving the agent live AWS access. This suits teams that would rather analyze an export than connect a credential. A bundle is a directory with these files the bundled sample is a complete worked example of the format : | File | Contents | Required | |---|---|---| | cloudtrail-mgmt.jsonl | CloudTrail management events, one event per line | Yes | | cloudtrail-data.jsonl | CloudTrail data events, one event per line | Optional | | findings.json | Array of Amazon GuardDuty findings | Optional | | account-state.json | Resource/identity snapshot, keyed by resource family | Optional | | dns-queries.jsonl | Amazon Route 53 Resolver query-log records, one per line | Optional | | flow-logs.jsonl | Amazon VPC Flow Log records, one per line | Optional | | s3-access.jsonl | Amazon S3 server access log records, one per line | Optional | The .jsonl files hold one raw JSON record per line — for CloudTrail, the same event shape delivered to Amazon S3. Only cloudtrail-mgmt.jsonl is required; any source you leave out is reported as a visibility gap during the investigation rather than causing an error, and malformed lines are skipped. Compare any file against evidence/sample-incident/ https://github.com/aws-samples/sample-incident-response-agent/blob/main/evidence/sample-incident for the exact shape. CloudTrail delivered to S3 arrives as gzipped JSON with the events under a Records array. To turn an export into cloudtrail-mgmt.jsonl one event per line , for example with jq https://jqlang.github.io/jq/ : From a folder of CloudTrail .json.gz files exported from S3: gunzip -c .json.gz | jq -c '.Records ' /path/to/my-bundle/cloudtrail-mgmt.jsonl Then point the server at your bundle and connect an agent host as usual: SEC BACKEND=local \ SEC BUNDLE=/path/to/my-bundle \ npm start Your logs stay on your machine: this backend makes no network calls and needs no credentials. Name the account your logs come from in your opening message, so the agent can confirm it is investigating the account you intend. First confirm which account your credentials profile uses: aws sts get-caller-identity --profile