investigating-aws-incidents

investigating-aws-incidents is a skill for Claude Code from trilwu/secskills. It costs 120 tokens per session (4,659 once invoked), scanned B, original, MIT.

A guide for investigating security incidents in Amazon Web Services, a cloud computing platform, by reconstructing actions from service logs and the identity that performed them.

In plain words
What is it for?
It helps investigate leaked keys, unusual CloudTrail activity, GuardDuty alerts, unauthorised IAM changes, crypto-mining, and suspected data theft from services such as S3.
Why use it?
An AWS compromise may involve many services, regions, and credentials, so the sequence of API calls must be connected to one user, access key, or assumed role.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the secskills-defense plugin — 22 skills shipped together

Good fit It helps investigate leaked keys, unusual CloudTrail activity, GuardDuty alerts, unauthorised IAM changes, crypto-mining, and suspected data theft from services such as S3.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trilwu/secskills/investigating-aws-incidents
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add trilwu/secskills --skill investigating-aws-incidents
Clone the repo
git clone --depth 1 https://github.com/trilwu/secskills

Made for: Claude Code.

Or install secskills-defense, the plugin that ships this one along with the rest of its 22 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for investigating-aws-incidents

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/investigating-aws-incidents/github.svg)](https://agentmods.dev/skills/trilwu/secskills/investigating-aws-incidents)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/investigating-aws-incidents"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/investigating-aws-incidents/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for investigating-aws-incidents

Your own site · 80×15
<a href="https://agentmods.dev/skills/trilwu/secskills/investigating-aws-incidents"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/investigating-aws-incidents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,659 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Server-Side Request Forgery · line 193
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00120 $0.04659
Opus 5 $0.00060 $0.02329
Sonnet 5 $0.00024 $0.00932
Haiku 4.5 $0.00012 $0.00466

Measured 13d ago against content hash c0beacdba438, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

investigating-aws-incidents scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Cloud metadata endpointmediumServer-side request forgery

One request to 169.254.169.254 can return temporary IAM credentials.

Instance Metadata Service (`http://169.254.169.254/latest/meta-data/iam/...`),

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

secskills-defense/skills/investigating-aws-incidents/SKILL.md · 382 lines

How it starts

The opening of the file, as written. The whole thing — 382 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Investigating AWS Incidents

In AWS an incident is reconstructed from logs the attacker usually could not delete -- CloudTrail, VPC Flow Logs, and the control plane's own record of every API call. The investigation is therefore a log-correlation exercise anchored on the compromised principal: the access key or assumed role, and the sequence of API calls it made. Find the principal, pull every event it generated, and the rest of the intrusion falls out of the timeline.

When to Use

  • Exposed or leaked AWS access keys -- committed to a repo, in a pastebin, or flagged by AWS abuse
  • Anomalous CloudTrail activity -- API calls from unfamiliar regions, IPs, or user agents
  • A GuardDuty finding -- credential exfiltration, tor traffic, crypto-mining, or anomalous IAM behavior
  • Unexpected IAM changes -- new users, keys, roles, login profiles, or policy attachments nobody authorized
  • Crypto-mining EC2 -- a spike in on-demand instances, GPU families, or an unexpected billing alert
  • S3 data exfiltration -- GetObject spikes, buckets made public, or shared snapshots

When NOT to Use

  • The incident is in Microsoft 365 / Entra ID, not AWS -- use investigating-m365-entra
  • The incident is in Azure resources/subscriptions -- use investigating-azure-incidents
  • The incident is in Google Cloud -- use investigating-gcp-incidents
  • The general IR process and host-level response -- use responding-to-incidents
  • You are the attacker, not the responder -- use exploiting-cloud-platforms
  • The pivot is specifically into Kubernetes on EKS -- use attacking-eks-gke-aks
  • Proactive hunting with no confirmed incident -- use hunting-threats

First-Hour Triage

Three actions, in order: identify the principal, pull its recent activity, preserve before you contain.

Scope the compromised principal. Whether the report is a leaked key, a GuardDuty finding, or a billing spike, resolve it to a single principal ARN -- an IAM user, a role, or the root account. That ARN is the anchor for everything that follows.

Read the full file on GitHub · 382 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago First seen · 382 lines · 120 tokens per session scan B c0beacdba438

Subscribe to this mod's changes

investigating-aws-incidents is a skill published in the GitHub repository trilwu/secskills (138 stars, last pushed 8d ago), licensed MIT. It adds 120 tokens to every session and 4,659 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

gke-alert-configuration

Configures alerting policies in Terraform for Google Kubernetes Engine (GKE) clusters, workloads, and services using PromQL and Google Cloud Managed Service for Prometheus. Use when writing, analyzing, validating, or deploying Terraform alerting policies to monitor GKE service latency, traffic, error rates using…

google/skills · 120 tokens

google-cloud-solution-n-tier-serverless-web-app

Assists in designing and implementing secure n-tier serverless web applications and microservices on Google Cloud. Use when users need architecture designs, security checklists, Terraform code, or deployment guidance for multi-tier serverless apps, regional data residency / European sovereignty compliance, zero-trust…

google/skills · 91 tokens

application-design-center-design-deploy

Processes GCP infrastructure design and deployment workflows within Application Design Center (ADC). Use when: - Designing GCP infrastructure with Terraform. - Validating local HCL. - Performing best-practice plan scans. - Importing templates to Application Design Center (ADC). - Deploying templates. - Troubleshooting…

google/skills · 94 tokens

cloud-run-basics

Manages Cloud Run services, jobs, and worker pools. Use when you need to deploy applications responding to HTTP requests (services), run event-triggered or scheduled tasks (jobs), or handle always-on pull-based background processing (worker pools).

google/skills · 53 tokens