Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)40k · #7074

aws-resource-health-diagnose

Skill này làm gì

Công cụ này giúp kiểm tra tình trạng sức khỏe của tài nguyên Amazon Web Services (AWS), xác định vấn đề bằng nhật ký và chỉ số, và đề xuất kế hoạch để sửa chúng.

Khi nào nên dùng

  • ✓Khi một dịch vụ AWS không hoạt động như mong đợi.
  • ✓Để hiểu vì sao một tài nguyên AWS chậm hoặc gặp lỗi.
  • ✓Trước khi thực hiện thay đổi lớn, để kiểm tra tình trạng hiện tại.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/aws-resource-health-diagnose/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/aws-resource-health-diagnose/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra sức khỏe của hàm Lambda của tôi tên 'my-api-function' và cho tôi biết cách sửa mọi vấn đề.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ trước tiên lấy thông tin chung về cách giám sát và xử lý sự cố trên AWS. Sau đó, nó tìm tài nguyên bạn chỉ định và kiểm tra trạng thái hiện tại cùng các chỉ số chính. Cuối cùng, nó phân tích nhật ký lỗi và đề xuất các bước khắc phục.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

AWS Resource Health & Issue Diagnosis

This workflow analyzes a specific AWS resource to assess its health status, diagnose potential issues using CloudWatch logs and metrics, and develop a comprehensive remediation plan for any problems discovered.

Prerequisites

  • AWS CLI configured and authenticated
  • Target AWS resource identified (name, type, and optionally region/account)
  • CloudWatch logging and metrics enabled on the target resource

Workflow Steps

Step 1: Get AWS Diagnostic Best Practices

Fetch https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ for monitoring and troubleshooting guidance to inform the diagnostic approach.

Step 2: Resource Discovery & Identification

Locate the target resource using the appropriate AWS CLI command for its type:

# EC2
aws ec2 describe-instances --filters "Name=tag:Name,Values=<name>"
# Lambda
aws lambda get-function --function-name <name>
# RDS
aws rds describe-db-instances --db-instance-identifier <name>
# ECS
aws ecs describe-services --cluster <cluster> --services <name>
# ALB
aws elbv2 describe-load-balancers --names <name>
# DynamoDB
aws dynamodb describe-table --table-name <name>
# SQS
aws sqs get-queue-attributes --queue-url <url> --attribute-names All
# API Gateway
aws apigatewayv2 get-apis

If multiple matches are found, prompt the user to specify region/account.

Step 3: Health Status Assessment

Run service-specific health checks:

# EC2
aws ec2 describe-instance-status --instance-ids <id>

# RDS
aws rds describe-db-instances --db-instance-identifier <name> \
  --query 'DBInstances[0].DBInstanceStatus'

# Lambda - error rate over 24h
aws cloudwatch get-metric-statistics --namespace AWS/Lambda \
  --metric-name Errors --dimensions Name=FunctionName,Value=<name> \
  --start-time $(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ) \
  --end-time $(date -u +%Y-%m-%dT%H:%M:%SZ) \
  --period 3600 --statistics Sum

# ECS
aws ecs describe-services --cluster <cluster> --services <name> \
  --query 'services[0].[status,runningCount,desiredCount,pendingCount]'

Key health indicators by service type:

  • Lambda: Error rate, throttle rate, duration P99, concurrent executions
  • RDS: CPU utilization, FreeStorageSpace, DatabaseConnections, ReadLatency/WriteLatency
  • ECS: Running vs desired task count, task stop reason
  • ALB: TargetResponseTime, HTTPCode_ELB_5XX_Count, UnHealthyHostCount
  • SQS: ApproximateNumberOfMessagesNotVisible, ApproximateAgeOfOldestMessage
  • DynamoDB: ConsumedReadCapacityUnits, ThrottledRequests, SuccessfulRequestLatency

Step 4: Log & Metrics Analysis

Find log groups and run CloudWatch Logs Insights queries:

# Find log groups
aws logs describe-log-groups --log-group-name-prefix /aws/<service>/<name>

# Start a query (last 24h errors)
aws logs start-query \
  --log-group-name /aws/lambda/<name> \
  --start-time $(date -u -d '24 hours ago' +%s) \
  --end-time $(date -u +%s) \
  --query-string 'filter @message like /ERROR/ | stats count(*) as errorCount by bin(1h)'

# Get results
aws logs get-query-results --query-id <id>

# Lambda cold starts
aws logs start-query \
  --log-group-name /aws/lambda/<name> \
  --start-time $(date -u -d '24 hours ago' +%s) \
  --end-time $(date -u +%s) \
  --query-string 'filter @type = "REPORT" | filter @initDuration > 0 | stats count() as coldStarts by bin(1h)'

# RDS Performance Insights (if enabled)
aws pi get-resource-metrics \
  --service-type RDS --identifier db:<identifier> \
  --metric-queries '[{"Metric":"db.load.avg"}]' \
  --start-time $(date -u -d '24 hours ago' +%Y-%m-%dT%H:%M:%SZ) \
  --end-time $(date -u +%Y-%m-%dT%H:%M:%SZ) \
  --period-in-seconds 3600

Identify: recurring error patterns, correlation with deployments (CloudTrail), performance trends, dependency failures.

Step 5: Issue Classification & Root Cause Analysis

Severity:

  • Critical: Service unavailable, data loss, security incidents
  • High: Performance degradation, error rates >5%, intermittent failures
  • Medium: Warnings, suboptimal configuration, minor performance issues
  • Low: Informational alerts, optimization opportunities

Root Cause Categories:

  • Configuration Issues: wrong settings, missing env vars, IAM permission denials
  • Resource Constraints: CPU/memory/disk limits, Lambda throttling, RDS connection exhaustion
  • Network Issues: security group rules, VPC routing, DNS, NACLs

…

Câu hỏi thường gặp

“Logs” và “metrics” là gì?

Logs là nhật ký ghi lại những gì đã xảy ra trong một dịch vụ. Metrics là dữ liệu số cho thấy hiệu năng, như mức sử dụng CPU hoặc số lần lỗi.

Tôi có cần điều kiện tiên quyết nào trước khi dùng không?

Có, bạn cần cài đặt công cụ AWS trên máy tính, và dịch vụ bạn muốn kiểm tra phải gửi nhật ký và chỉ số đến CloudWatch.

Công cụ có kiểm tra được loại tài nguyên AWS nào?

Nó kiểm tra được nhiều loại, gồm EC2 (máy chủ ảo), Lambda (hàm không máy chủ), RDS (cơ sở dữ liệu), ECS (container), ALB (cân bằng tải), DynamoDB (cơ sở dữ liệu NoSQL), SQS (hàng đợi tin nhắn) và API Gateway.

Chi tiết

Mô tả gốc của tác giả

Analyze AWS resource health, diagnose issues from CloudWatch logs and metrics, and create a remediation plan for identified problems.

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7074
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự