본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)40k · #7072

aws-cloudwatch-investigation

하는 일

이 도구 모음은 Amazon의 클라우드 시스템(AWS)에서 발생한 문제를 조사하는 데 도움을 줍니다. 로그에서 오류를 찾고, 최근 업데이트가 문제를 일으켰는지 확인하며, 문제의 범위를 파악하고, 성능 지표를 분석하는 템플릿을 제공합니다.

사용하는 경우

  • ✓AWS 시스템에서 오류가 발생하고 있을 때.
  • ✓최근 업데이트가 문제를 일으켰는지 알고 싶을 때.
  • ✓장애로 시스템의 어느 부분이 영향을 받았는지 알아내려 할 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/aws-cloudwatch-investigation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/aws-cloudwatch-investigation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“결제 시스템에서 최근 발생한 오류를 조사해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

사전 정의된 쿼리를 사용해 CloudWatch 로그와 지표를 분석합니다. 문제와 업데이트를 연관짓기 위해 AWS 활동 로그를 확인합니다. 영향 범위를 파악하기 위해 계정, 리전, 서비스별로 하나씩 제외하는 방식으로 진행합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

AWS CloudWatch Investigation Skill

Reusable patterns for investigating production incidents using CloudWatch Logs, Metrics, and Alarms. These patterns are designed to be composed together during incident triage.


Pattern 1: Logs Insights Query Templates

Error Spike Detection

Find the top errors in a time window, grouped by error type:

fields @timestamp, @message, @logStream
| filter @message like /(?i)(error|exception|fatal|critical)/
| stats count(*) as errorCount by bin(5m), @logStream
| sort errorCount desc
| limit 20

P99 Latency Breakdown by Operation

Identify which operations are driving latency spikes:

fields @timestamp, @duration, operation
| filter ispresent(@duration)
| stats avg(@duration) as avgMs,
        pct(@duration, 50) as p50Ms,
        pct(@duration, 95) as p95Ms,
        pct(@duration, 99) as p99Ms,
        count(*) as invocations
  by operation
| sort p99Ms desc
| limit 15

Lambda Cold Start Detection

Quantify cold start impact during an incident:

fields @timestamp, @duration, @initDuration, @memorySize, @maxMemoryUsed
| filter ispresent(@initDuration)
| stats count(*) as coldStarts,
        avg(@initDuration) as avgInitMs,
        max(@initDuration) as maxInitMs,
        avg(@duration) as avgDurationMs
  by bin(5m)
| sort @timestamp desc

Out-of-Memory (OOM) Detection

Find Lambda functions or containers killed by memory pressure:

fields @timestamp, @message, @logStream, @memorySize, @maxMemoryUsed
| filter @message like /Runtime exited|out of memory|OOMKilled|Cannot allocate memory|MemoryError/
| stats count(*) as oomEvents by @logStream, bin(10m)
| sort oomEvents desc
| limit 10

For memory utilization trending before OOM:

fields @timestamp, @maxMemoryUsed, @memorySize
| filter ispresent(@maxMemoryUsed)
| stats max(@maxMemoryUsed / @memorySize * 100) as peakMemPct,
        avg(@maxMemoryUsed / @memorySize * 100) as avgMemPct
  by bin(5m)
| sort @timestamp desc

Timeout Detection

Find invocations that hit the configured timeout:

fields @timestamp, @duration, @logStream, @requestId
| filter @message like /Task timed out/ or @duration > 28000
| stats count(*) as timeouts by @logStream, bin(5m)
| sort timeouts desc

Pattern 2: Alarm History to Deploy-Event Correlation

Process

  1. Get alarm transition time — note the exact timestamp when the alarm entered ALARM state.
  2. Query CloudTrail for deployment-related events in a window of [alarm_time - 30min, alarm_time]:
# CloudTrail Lake query for deployment events
SELECT eventTime, eventName, userIdentity.arn, requestParameters
FROM <event-data-store-id>
WHERE eventTime > '<alarm_time_minus_30m>'
  AND eventTime < '<alarm_time>'
  AND eventName IN (
    'UpdateFunctionCode', 'UpdateFunctionConfiguration',
    'UpdateService', 'CreateDeployment', 'RegisterTaskDefinition',
    'CreateChangeSet', 'ExecuteChangeSet',
    'StartPipelineExecution', 'PutImage'
  )
ORDER BY eventTime DESC
  1. Correlation criteria — a deploy is "correlated" if:

    • It targets the same service/resource as the alarm
    • It completed within 15 minutes before the alarm transition
    • The deployer identity matches a CI/CD role (not a human applying a hotfix)
  2. Strengthening the correlation:

    • Check if the same alarm was healthy in the previous deployment cycle
    • Verify no other environmental changes (scaling events, config changes) in the same window
    • Look for canary/synthetic monitor failures that started at the same time

Output Format

Deploy Correlation:
  Event: UpdateFunctionCode
  Time: 2024-03-15T14:23:07Z (12 min before alarm)
  Actor: arn:aws:sts::123456789012:assumed-role/github-actions-deploy/session
  Resource: arn:aws:lambda:us-east-1:123456789012:function:payment-processor
  Correlation: STRONG — same resource, CI/CD actor, alarm was OK prior cycle

Pattern 3: Narrow the Blast Radius Decision Tree

Use this tree to systematically scope an incident from broadest to most specific:

START
  |
  v
[1] ACCOUNT — Which account(s) show the alarm?
  |  - Check: Are alarms firing in multiple accounts?
  |  - If yes → suspect shared service (SSO, networking, shared deployment pipeline)
  |  - If no → proceed to Region
  v
[2] REGION — Which region(s) are affected?
  |  - Check: Same alarm in other regions?
  |  - If multi-region → suspect global service (IAM, Route53, S3 global)

…
자주 묻는 질문

‘Logs Insights 쿼리 템플릿’이란 무엇인가요?

시스템 활동 로그 안에서 오류나 느림 같은 특정 정보를 찾는 데 도움이 되는 쿼리 템플릿입니다.

업데이트가 문제를 일으켰는지 어떻게 알아내나요?

경고가 발생한 시간과 바로 전에 이루어진 소프트웨어 업데이트 기록을 비교합니다. 문제 직전에 업데이트가 있었다면 원인일 수 있습니다.

‘영향 반경 좁히기(Narrow the Blast Radius)’는 무엇을 의미하나요?

문제가 얼마나 큰지 파악하는 것을 뜻합니다. 문제가 전체 계정, 특정 리전, 특정 서비스, 또는 특정 리소스 하나에만 영향을 주는지 확인하는 데 도움이 됩니다.

상세 정보

작성자의 원본 설명

Reusable investigation patterns for AWS CloudWatch: Logs Insights query templates, alarm-to-deployment correlation, blast-radius narrowing decision tree, and PromQL-style metric query patterns for structured incident triage.

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7072
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬