/aws-cloudwatch:aws-cloudwatchfrom aws-cloudwatch
Investigates AWS incidents from CloudWatch alarms, metrics, Logs Insights and CloudTrail: blast radius, change correlation, timeline, resource health; read-only, fixes only after approval. Use when an alarm fired, an AWS-hosted service is erroring or slow, or to find what changed before a failure. Not for the write-up (postmortem), Sentry errors (sentry-sdk) or PromQL (promql).
Ships in aws-cloudwatch. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Work from a symptom to a supported cause using alarm history, metrics, logs, and change records. Report evidence and confidence, and propose fixes. Run none of them without approval.
Not for application error tracking in Sentry (sentry-sdk, if installed), the written incident postmortem (postmortem, if installed), listing resources without a symptom (aws-resource-query, if installed), or architecture and cost review (aws-well-architected, if installed).
--profile <profile> --region <region> on every command, and confirm identity first with aws sts get-caller-identity --profile <profile> --query '{Account:Account,Arn:Arn}' --output table. If the session expired, ask the user to run aws sso login --profile <profile> (profile, SSO, IAM and CLI quirks go to aws). Never read ~/.aws/credentials, ~/.aws/sso/cache/, or ~/.aws/cli/cache/, never run aws configure list or aws configure export-credentials, and never print key material.cloudwatch describe-*/get-*/list-*, logs describe-*, logs start-query, logs get-query-results, logs stop-query, cloudtrail lookup-events, pi get-resource-metrics, health describe-events, and the read calls the aws-resource-query skill lists.secretsmanager get-secret-value and batch-get-secret-value, ssm get-parameter*, kms decrypt, credential-minting sts calls, ecr get-login-password and get-authorization-token, eks get-token, rds generate-db-auth-token, ec2 get-password-data, logs get-log-events, logs filter-log-events, logs tail, ssm get-command-invocation, s3api get-object, dynamodb get-item/query/scan, sqs receive-message. The full list is in aws-resource-query, if installed. Output-expanding flags such as --with-decryption, --details, --include-value(s) and --attribute userData are off limits. Read logs through Logs Insights only.describe-* or list-* call needs a --query naming the fields to print, because many return secrets in full output (Lambda Environment.Variables, ECS task definition environment, launch template UserData, CloudFormation parameters).aws logs stop-query --query-id <id>.--dry-run where the API supports it, and verify with a read afterwards. Every other call is a read.Frame the incident. Get the symptom, the affected resource or service, the first-seen time, the region, and the profile. Work in UTC. When an alarm is the entry point, pull its transitions:
aws cloudwatch describe-alarm-history --alarm-name <alarm> --history-item-type StateUpdate \
--start-date <iso-start> --end-date <iso-end> \
--query 'AlarmHistoryItems[].[Timestamp,HistorySummary]' --output table
An alarm enters ALARM only after its period times its evaluation periods, so the real onset is earlier than the transition. Widen the window backward by that amount.
Scope the blast radius. Walk from broad to narrow and stop at the level where the symptom stops spreading.
| Level | Question | If broad, suspect |
|---|---|---|
| Account | Do alarms fire in several accounts? | Shared SSO, networking, or deploy pipeline |
| Region | Same alarm in other regions? | A global service (IAM, Route 53) or a multi-region deploy |
| Service | Which namespaces (AWS/Lambda, AWS/ECS, AWS/ApplicationELB) degrade? | A shared dependency |
| Operation | One function, route, or table, or all of them? | Throttling or quota when all fail |
| Resource | Which instance, task, or function version? | This is the investigation target |
When several services fail together, check shared dependencies in this order: VPC and NAT (for example ErrorPortAllocation on the NAT gateway), IAM and STS throttling, a shared database or cache, a pipeline run that deployed several services at once, then AWS-side events (aws health describe-events --region us-east-1, which may require a support plan that includes the Health API, so skip it if the call is refused).
Read the metrics. Compare the incident window with a baseline from the same hour a week earlier, and compute rates with metric math rather than eyeballing counts. Read references/metrics.md.
Read the logs. Start from the error spike and latency queries in references/logs-insights.md, which also covers running a query from the CLI and polling for results. Query by log group, one resource at a time.
Find what changed. Look up write events near the onset:
aws cloudtrail lookup-events --region <region> \
--lookup-attributes AttributeKey=ResourceName,AttributeValue=<resource-name> \
--start-time <onset-minus-60m> --end-time <onset-plus-5m> \
--query 'Events[].[EventTime,EventName,Username]' --output table
lookup-events takes one attribute per call. To scan all writes in the window, use AttributeKey=ReadOnly,AttributeValue=false and filter the output. It covers management events from the last 90 days, is limited to two requests per second per region, and omits data events. Use CloudTrail Lake only if the account already has an event data store.
Call a change correlated when it hit the same resource, landed before the first symptom (not just before the alarm), and came from a deploy role rather than a person. Strengthen the case if the alarm was healthy in the previous cycle and no scaling or configuration event shares the window. Say "no correlated change found" when nothing fits, instead of naming the nearest deploy.
Rebuild the timeline. Merge the first anomalous metric point, the first error line, the change events, and the alarm transitions into one ordered list, with the source of each entry. The root event is the earliest change that precedes every symptom. Mark the entries you could not source.
Check the implicated resource. Read references/resource-health.md for the resource type: discovery command, key metrics, log source, and usual causes for EC2, RDS, Lambda, ECS, ALB, DynamoDB, and SQS.
Report. Give a short summary, the timeline, the evidence for the leading cause, a confidence level (confirmed, likely, or unknown), and what you could not check. Rate each issue found: Critical for unavailable service, data loss, or a security incident; High for degraded performance, error rates above about 5 percent, or intermittent failures; Medium for warnings, weak configuration, or minor slowdowns; Low for informational items and optimizations. Label its cause as configuration, resource limits, network, application, dependency, or security. Then list remediation as proposals, split into immediate, short-term, and long-term, with the exact command for each mutating step marked as needing the user's go-ahead. Example proposals are aws lambda put-function-concurrency --function-name <name> --reserved-concurrent-executions <n> for throttling and aws ecs update-service --cluster <c> --service <s> --force-new-deployment for a stuck service, each with its blast radius and a rollback.
Errors point for a period with no invocations, so a gap can mean no traffic. Check Invocations beside it.eventTime.get-metric-statistics caps at 1,440 datapoints. Use get-metric-data, which allows up to 100,800.references/logs-insights.md: read when running or writing a Logs Insights query.references/metrics.md: read when pulling metrics, building rates, or comparing against a baseline.references/resource-health.md: read when a specific resource type is implicated.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin aws-cloudwatch