aws-cost-optimization
Skill này làm gì
Công cụ này giúp bạn giảm chi tiêu AWS. Nó phân tích cách bạn dùng tài nguyên và gợi ý cách tiết kiệm tiền, như thu nhỏ máy ảo hoặc dùng các gói giảm giá.
Khi nào nên dùng
- ✓Khi hóa đơn AWS của bạn cao bất thường.
- ✓Khi bạn chuẩn bị trình bày chi phí đám mây cho nhóm của mình.
- ✓Khi bạn muốn tìm và xóa các tài nguyên không dùng.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/aws-cost-optimization/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm thế nào để giảm hóa đơn AWS trong tháng này?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ dùng dữ liệu sử dụng AWS để tìm các tài nguyên có thể thu nhỏ hoặc không được dùng. Nó cũng giúp chọn các gói giảm giá phù hợp nhất với mức chi tiêu thường xuyên của bạn.
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 Cost Optimization
Apply practical FinOps controls to reduce AWS spend without sacrificing reliability or performance.
When to Use This Skill
- Monthly AWS bill spikes unexpectedly or exceeds budget thresholds
- Preparing cost reviews with engineering and finance teams
- Rightsizing EC2, RDS, EKS, or Lambda workloads after load testing
- Choosing between Savings Plans, Reserved Instances, or on-demand pricing
- Setting up automated budget alerts and anomaly detection
- Cleaning up unused resources (unattached EBS, idle load balancers, old snapshots)
- Optimizing data transfer costs across regions and AZs
Prerequisites
- AWS CLI v2 installed and configured (
aws configure) - IAM permissions:
ce:*,budgets:*,ec2:Describe*,cloudwatch:PutMetricAlarm,s3:PutLifecycleConfiguration - Cost Explorer enabled in the AWS billing console (takes 24 hours to populate)
- Cost allocation tags activated in the Billing console
Cost Review Workflow
- Tag every resource by team, service, environment, and cost center.
- Enable Cost Explorer and activate Cost and Usage Reports (CUR) to S3.
- Identify top spend drivers by service, account, and tag.
- Rightsize underutilized compute and storage based on CloudWatch metrics.
- Apply commitment discounts (Savings Plans or RIs) for stable baseline usage.
- Set budgets, anomaly alerts, and build KPI dashboards.
- Review monthly and iterate.
Cost Explorer CLI Commands
# Get cost and usage for the last 30 days grouped by service
aws ce get-cost-and-usage \
--time-period Start=2026-02-01,End=2026-03-01 \
--granularity MONTHLY \
--metrics "BlendedCost" "UnblendedCost" "UsageQuantity" \
--group-by Type=DIMENSION,Key=SERVICE
# Get cost forecast for the next 30 days
aws ce get-cost-forecast \
--time-period Start=2026-03-24,End=2026-04-24 \
--metric UNBLENDED_COST \
--granularity MONTHLY
# Get cost grouped by a specific tag (e.g., team)
aws ce get-cost-and-usage \
--time-period Start=2026-02-01,End=2026-03-01 \
--granularity MONTHLY \
--metrics "UnblendedCost" \
--group-by Type=TAG,Key=team
# Get rightsizing recommendations for EC2
aws ce get-rightsizing-recommendation \
--service "AmazonEC2" \
--configuration '{"RecommendationTarget":"SAME_INSTANCE_FAMILY","BenefitsConsidered":true}'
# Get Savings Plans purchase recommendation
aws ce get-savings-plans-purchase-recommendation \
--savings-plans-type COMPUTE_SP \
--term-in-years ONE_YEAR \
--payment-option NO_UPFRONT \
--lookback-period-in-days SIXTY_DAYS
# Get Savings Plans utilization
aws ce get-savings-plans-utilization \
--time-period Start=2026-02-01,End=2026-03-01 \
--granularity MONTHLY
# Get Reserved Instance utilization
aws ce get-reservation-utilization \
--time-period Start=2026-02-01,End=2026-03-01 \
--granularity MONTHLY
Budget Alerts
# Create a monthly cost budget with email alert at 80% and 100%
aws budgets create-budget \
--account-id 123456789012 \
--budget '{
"BudgetName": "monthly-total",
"BudgetLimit": {"Amount": "5000", "Unit": "USD"},
"TimeUnit": "MONTHLY",
"BudgetType": "COST",
"CostFilters": {},
"CostTypes": {
"IncludeTax": true,
"IncludeSubscription": true,
"UseBlended": false
}
}' \
--notifications-with-subscribers '[
{
"Notification": {
"NotificationType": "ACTUAL",
"ComparisonOperator": "GREATER_THAN",
"Threshold": 80,
"ThresholdType": "PERCENTAGE"
},
"Subscribers": [{"SubscriptionType": "EMAIL", "Address": "finops@example.com"}]
},
{
"Notification": {
"NotificationType": "ACTUAL",
"ComparisonOperator": "GREATER_THAN",
"Threshold": 100,
"ThresholdType": "PERCENTAGE"
},
"Subscribers": [{"SubscriptionType": "EMAIL", "Address": "finops@example.com"}]
}
]'
# List all budgets
aws budgets describe-budgets --account-id 123456789012
# Enable Cost Anomaly Detection monitor for all services
aws ce create-anomaly-monitor \
--anomaly-monitor '{
"MonitorName": "all-services",
"MonitorType": "DIMENSIONAL",
"MonitorDimension": "SERVICE"
}'
# Create anomaly subscription (alert when impact > $50)
aws ce create-anomaly-subscription \
--anomaly-subscription '{
"SubscriptionName": "cost-alerts",
"MonitorArnList": ["arn:aws:ce::123456789012:anomalymonitor/monitor-id"],
…
Câu hỏi thường gặp
“Rightsizing” là gì?
Đó là điều chỉnh kích thước tài nguyên (như máy ảo) cho phù hợp với khối lượng công việc thực tế, để bạn không phải trả tiền cho năng lực không dùng đến.
“Savings Plans” và “Reserved Instances” là gì?
Đây là các gói giảm giá bạn mua từ AWS, đổi lại cam kết sử dụng dài hạn, thường giúp chi phí thấp hơn.
Tôi có cần kiến thức kỹ thuật để dùng công cụ này không?
Nên có chút hiểu biết về AWS và đã cài đặt các công cụ dòng lệnh của AWS. Công cụ này đơn giản hóa quá trình tối ưu.
Chi tiết
Mô tả gốc của tác giả
Reduce AWS spend with rightsizing, autoscaling, commitment planning, and storage lifecycle policies. Use when running FinOps reviews, lowering cloud bills, or improving cost-per-request metrics.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #3856
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
knowledge-capture
394kDạy agent của bạn lưu các quyết định, sở thích và sự kiện quan trọng vào kho Knowledge dưới dạng ghi chú ngắn có ghi nguồn.
knowledge-claim-consolidation
394kGiúp agent của bạn dọn gọn kho Knowledge bằng cách gộp các khẳng định trùng lặp, chuyển chúng đến đúng trang chủ đề và loại bỏ những cái lỗi thời.
knowledge-correct
394kCho phép agent của bạn sửa hoặc rút lại một khẳng định hoặc trang Knowledge cụ thể theo yêu cầu của bạn, và giữ nhật ký những gì đã thay đổi.