aws-support-case
npx skills add https://github.com/oldwinter/skills --skill aws-support-case
Agent 安装分布
Skill 文档
AWS Support Case Manager
Overview
Manage AWS Support cases through CLI with intelligent features: auto-detect service/category when creating cases, translate Chinese to English for submissions, and display case communications in bilingual format (English original followed by Chinese translation).
Prerequisites
- AWS CLI configured with default profile
- AWS Support API access (requires Business or Enterprise Support plan for some features)
- All commands must use
--region us-east-1(Support API only available in this region)
Core Workflows
1. List Cases
List recent 2 weeks cases:
aws support describe-cases \
--region us-east-1 \
--after-time "$(date -u -v-14d '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || date -u -d '14 days ago' '+%Y-%m-%dT%H:%M:%SZ')" \
--include-resolved-cases \
--output json
List unresolved cases only:
aws support describe-cases \
--region us-east-1 \
--no-include-resolved-cases \
--output json
Display format: Present cases in a clear table with columns: Case ID | Subject | Status | Created | Severity
2. View Case Details (Bilingual Display)
To view a case with communications:
aws support describe-communications \
--region us-east-1 \
--case-id "case-XXXXXXXX" \
--output json
Bilingual Display Format: When displaying case communications, format each message as follows:
---
[Sender] | [Timestamp]
---
> Original English text line 1
> ä¸æç¿»è¯ç¬¬ä¸è¡
> Original English text line 2
> ä¸æç¿»è¯ç¬¬äºè¡
---
Translation guidelines:
- Translate each sentence/paragraph, placing English original first with
>prefix - Chinese translation immediately follows on the next line with
>prefix - Preserve technical terms (service names, error codes, ARNs) without translation
- Maintain formatting (bullet points, numbered lists) in both languages
3. Create New Case
Step 1: Query available services and categories
aws support describe-services --region us-east-1 --output json
Step 2: Auto-detect service and category
Analyze the user’s description (Chinese or English) to identify:
- Service code: Match keywords to AWS services (e.g., “EC2å®ä¾” â
amazon-ec2, “S3å卿¡¶” âamazon-s3) - Category code: Match issue type (e.g., “æ§è½æ
¢” â
performance, “æ æ³è¿æ¥” âconnectivity, “é é¢æå” âlimits)
Step 3: Translate and create
If user provides Chinese description:
- Translate to professional, native English
- Use technical AWS terminology appropriately
- Keep specific identifiers (account IDs, resource ARNs, error codes) unchanged
aws support create-case \
--region us-east-1 \
--subject "Translated English subject" \
--communication-body "Translated English description with full details" \
--service-code "detected-service" \
--category-code "detected-category" \
--severity-code "low|normal|high|urgent|critical" \
--language "en"
Severity selection guide:
| Severity | When to use |
|---|---|
| low | General questions, non-urgent inquiries |
| normal | Production system has minor issues |
| high | Production system significantly impaired |
| urgent | Production system severely impaired |
| critical | Production system down (Enterprise only) |
4. Reply to Case
Step 1: Translate if needed
If user provides Chinese reply, translate to professional English while preserving:
- Technical details and identifiers
- Specific error messages or logs
- Resource names and ARNs
Step 2: Send reply
aws support add-communication-to-case \
--region us-east-1 \
--case-id "case-XXXXXXXX" \
--communication-body "Translated English reply"
5. Handle Attachments
Upload attachment:
# First, base64 encode the file
BASE64_DATA=$(base64 -i /path/to/file)
# Add to attachment set
aws support add-attachments-to-set \
--region us-east-1 \
--attachments fileName="filename.ext",data="$BASE64_DATA"
This returns an attachmentSetId to use when replying:
aws support add-communication-to-case \
--region us-east-1 \
--case-id "case-XXXXXXXX" \
--communication-body "Please see the attached file" \
--attachment-set-id "ATTACHMENT_SET_ID"
Download attachment:
aws support describe-attachment \
--region us-east-1 \
--attachment-id "attachment-id"
6. Close/Resolve Case
aws support resolve-case \
--region us-east-1 \
--case-id "case-XXXXXXXX"
Service Detection Keywords
| Keywords (CN/EN) | Service Code |
|---|---|
| EC2, å®ä¾, èææº | amazon-ec2 |
| S3, å卿¡¶, 对象åå¨ | amazon-s3 |
| RDS, æ°æ®åº, MySQL, PostgreSQL | amazon-rds |
| Lambda, 彿°, æ æå¡å¨ | aws-lambda |
| VPC, ç½ç», åç½, å®å ¨ç» | amazon-vpc |
| ECS, 容å¨, Docker | amazon-ecs |
| EKS, Kubernetes, K8s | amazon-eks |
| CloudFront, CDN, åå | amazon-cloudfront |
| Route53, DNS, åå | amazon-route53 |
| IAM, æé, è§è², çç¥ | aws-iam |
| è´¦å, è´¹ç¨, billing | aws-billing |
| è´¦æ·, è´¦å·, account | account-management |
Category Detection Keywords
| Keywords (CN/EN) | Category Code |
|---|---|
| å¨è¯¢, æå¯¼, å¦ä½, how to | general-guidance |
| æ ¢, æ§è½, å»¶è¿, performance, latency | performance |
| è¿æ¥, 访é®, è¶ æ¶, connect, timeout | connectivity |
| å®å ¨, æ¼æ´, security | security |
| é ç½®, 设置, configuration | configuration |
| éé¢, é é¢, æå, limit, quota | limits |
Resources
Refer to references/aws-support-cli-reference.md for complete CLI command reference and additional options.