옵션
집 Skill 클라우드 인프라 aws-billing-and-cost-management

aws-billing-and-cost-management

aws/agent-toolkit-for-aws aws/agent-toolkit-for-aws

AWS 비용을 분석하고, 절감 기회를 찾으며, 예산을 관리하고, Savings Plan 및 Reserved Instance를 평가하며, Compute Optimizer를 통해 EC2/Lambda/RDS/EBS의 적정 규모를 조정하고, 서비스 요금을 조회하며, Athena로 CUR을 쿼리하고, 비용 이상 징후를 감지하고, 청구 보기에 따라 비용을 분류하며, 무료 티어 사용량을 모니터링합니다. 트리거 대상: AWS 청구서, 비용 분석, 지출 절감, 세이빙 플랜, 예약 인스턴스, 적정 규모 조정, 예산 알림, 비용 최적화, 가격, 무료 티어, 비용 이상 징후, CUR, 비용 감사, 청구 보기, 청구 보기 ARN.

...모든 것을 확장하십시오
16
업데이트 된 시간 2026년 8월 25일

개요 aws-billing-and-cost-management

AWS 비용 관리 제품에 담긴 도메인 전문 지식(흔히 발생하는 함정, 올바른 API 사용 패턴, 최적화 워크플로우 등)을 반영하여 AWS 비용을 분석, 최적화 및 관리합니다. 이 도구는 지출 및 비용 추세를 분석하고, 예산 알림을 설정하며, Savings Plan 및 Reserved Instance를 평가하고, EC2, Lambda, RDS 및 EBS 리소스의 적절한 규모 조정, 서비스 가격 조회, 비용 감사 수행 또는 비용 급증 원인 조사, Athena를 통한 CUR 데이터 쿼리, 청구 뷰에 대한 분석 범위 지정, 무료 티어 사용량 확인 등에 사용됩니다. 핵심 개념으로는 Cost Explorer, 예산, 청구 뷰, Compute Optimizer, 비용 최적화 허브, Savings Plans 및 Reserved Instances, 그리고 Athena를 통해 쿼리하는 CUR 2.0 등이 있습니다. AWS MCP 서버는 샌드박스 실행 및 감사 로깅을 위한 권장 구성이지만, 명령어는 표준 AWS CLI 액세스 권한이 있는 모든 에이전트에서도 작동합니다.

두 가지 중요한 규칙이 강조됩니다. Cost Explorer, Budgets 또는 Savings Plans 호출 전에 반드시 도구를 사용하여 현재 날짜를 확인해야 합니다. 모델은 종종 훈련 데이터의 연도를 기본값으로 설정하여 오래된 데이터를 분석하기 때문입니다. 합계, 평균, 백분율, 비교 및 개수 계산과 같은 수치 계산은 응답 내에서 추론해서는 안 되며, 항상 스크립트나 계산기 도구를 사용하여 수행해야 합니다. 비용 데이터에 대한 LLM의 산술 연산은 신뢰할 수 없기 때문입니다.

의사 결정 가이드는 각 질문을 적절한 도구와 참조 파일로 안내하며, ‘일반적인 작업’ 섹션에서는 구체적인 명령어를 제공합니다. 서비스별 비용은 SERVICE로 그룹화된 aws ce get-cost-and-usage를 사용하여 분석하며, 기본값은 UnblendedCost이고, RECORD_TYPE 필터를 통해 크레딧 및 환불을 제외하고, 종료 날짜는 제외된 것으로 처리합니다. Compute Optimizer를 사용하려면 update-enrollment-status를 통해 상태를 Active로 설정하여 옵트인해야 합니다. ‘청구 뷰(Billing Views)’ 섹션에서는 --billing-view-arn을 지원되는 호출에 추가하여 청구 데이터를 특정 청구 범위로 제한하는 방법을 설명하고, `aws billing list-billing-views`를 통해 청구 뷰를 나열하며, 예산 JSON에 BillingViewArn을 포함하는 방법과 함께, Cost Explorer API 중 청구 뷰 ARN을 지원하는 API와 지원하지 않는 API를 정리한 표를 보여줍니다. 문제 해결 표에서는 잘못된 차원 키로 인한 ValidationException, 필터링된 결과가 비어 있는 경우, 시간별 데이터에 대한 AccessDenied 오류, 예산이 us-east-1 리전에서 실행되어야 한다는 요구 사항 등의 오류를 해당 해결 방법과 연결하여 설명합니다.

자주 묻는 질문

비용 API 호출을 수행하기 전에 현재 날짜를 확인해야 하는 이유는 무엇입니까?

LLM은 실제 현재 날짜 대신 훈련 데이터의 날짜를 기본값으로 사용하는 경우가 많기 때문에, 겉보기에는 정확해 보이지만 실제로는 잘못된 오래된 데이터에 대한 분석 결과를 산출합니다. Cost Explorer, Budgets 또는 Savings Plans 호출을 수행하기 전에 도구를 사용하여 현재 날짜를 확인해야 합니다.

비용 데이터에 대한 수치 계산은 어떻게 수행해야 합니까?

절대 응답 내용을 바탕으로 추론해서는 안 됩니다. 합계, 평균, 백분율, 비교, 개수, 최소값 또는 최대값은 항상 스크립트나 계산기 도구(예: 결과를 출력하는 Python 스크립트)를 사용하여 계산해야 합니다. LLM의 산술 연산은 비용 데이터에 대해 신뢰할 수 없기 때문입니다.

비용 분석 범위를 특정 청구 보기로 제한하려면 어떻게 해야 합니까?

지원되는 API 호출에 --billing-view-arn을 추가하고, aws billing list-billing-views를 통해 사용 가능한 뷰를 확인하십시오(billing:ListBillingViews 권한 필요). 지원되는 호출에는 ce get-cost-and-usage 및 get-cost-forecast가 포함되지만, 예약 및 비용 절감 플랜의 적용 범위 및 사용량 호출은 이를 지원하지 않습니다.

Compute Optimizer를 사용하려면 어떤 설정이 필요합니까?

먼저 `aws compute-optimizer update-enrollment-status`를 실행하여 상태를 Active로 설정하여 옵트인해야 합니다. 등록되지 않은 경우, 호출은 'Account not registered' 오류와 함께 실패합니다.

us-east-1 이외의 리전에서 Budgets API 호출이 실패하는 이유는 무엇입니까?

Budgets API는 us-east-1 리전을 요구합니다. 문제 해결을 위해서는 Budgets 호출 시 리전을 us-east-1로 설정해야 합니다.

모든 파일

16개파일 references/cost-explorer.md 7.3KB 보기 references/cost-audit.md 3.2KB 보기 references/cur-athena.md 7.0KB 보기 references/deterministic-calculations.md2.5KB보기 참조/ebs-optimization.md2.7KB보기 참조/ec2-rightsizing.md3.2KB보기 참조/pricing-lookup.md3.8KB보기 참조/rds-optimization.md1.8KB보기 참조/service-optimization.md2.9KBViewSKILL.md8.8KBViewreferences/budgets.md2.3KBViewreferences/cost-optimization-hub.md7.1KBViewreferences/free-tier.md1.6KB 참조 보기/reserved-instances.md2.3KB 참조 보기/lambda-optimization.md2.1KB 참조 보기/savings-plans.md3.3 KB 보기
GitHub에서 보기

Overview

Analyze, optimize, and manage AWS costs. This skill encodes domain expertise from AWS's cost management products — gotchas, correct API usage patterns, and optimization workflows that models frequently get wrong.

Usage

Use this skill when:

  • Analyzing AWS spending, cost trends, or cost breakdowns
  • Setting up or managing budget alerts
  • Evaluating Savings Plans or Reserved Instance purchases
  • Right-sizing EC2, Lambda, RDS, or EBS resources
  • Looking up AWS service pricing
  • Running cost audits or investigating cost spikes
  • Querying CUR data with Athena
  • Scoping cost analysis to a specific billing view
  • Checking Free Tier usage

Core Concepts

  • Cost Explorer — query cost/usage data by service, account, tag, or time range
  • Budgets — set spending thresholds with alerts; supports billing view scoping
  • Billing Views — scope cost data to a subset of billing (custom view, billing group, or primary)
  • Compute Optimizer — right-sizing recommendations for EC2, Lambda, EBS, RDS
  • Cost Optimization Hub — aggregated savings recommendations across services
  • Savings Plans / Reserved Instances — commitment-based discounts
  • CUR 2.0 — detailed line-item billing data queryable via Athena

Recommended setup: Use the AWS MCP server for sandboxed execution, audit logging, and enterprise controls. See: https://docs.aws.amazon.com/aws-mcp/

Without AWS MCP: All commands use standard AWS CLI syntax and work with any agent that has CLI access.

Critical Rule: Always Check the Current Date

Before making ANY Cost Explorer, Budgets, or Savings Plans API call, you MUST determine the current date. Use a tool to get the current date and time — do NOT assume or guess the year. LLMs frequently default to dates from their training data instead of the actual current date, producing analyses of stale data that appear correct but are completely wrong.

Critical Rule: Deterministic Calculations

You MUST NEVER perform numerical calculations (sums, averages, percentages, comparisons, counts, min/max) by reasoning in your response. LLM arithmetic is unreliable and produces wrong answers on cost data.

You MUST ALWAYS use a script or calculator tool for any math on data returned from API calls. Write a Python script that performs the calculation and prints the result. If the AWS MCP server's run_script tool is available, use it. Otherwise, run the script locally.

Read references/deterministic-calculations.md for patterns and examples.

Decision Guide

QuestionToolReference
What am I spending? Where are costs going up?Cost Explorerreferences/cost-explorer.md
How much does a service cost?Price List APIreferences/pricing-lookup.md
Where can I save money? (start here)Cost Optimization Hubreferences/cost-optimization-hub.md
Should I buy Savings Plans?CE SP Recommendationsreferences/savings-plans.md
Should I buy Reserved Instances?CE RI Recommendationsreferences/reserved-instances.md
Deep-dive on a specific EC2/Lambda/EBS/RDS rec?Compute Optimizerreferences/ec2-rightsizing.md, references/lambda-optimization.md, references/rds-optimization.md, references/ebs-optimization.md
How do I set up budget alerts?Budgetsreferences/budgets.md
What's causing a cost spike?Cost Anomaly Detectionreferences/cost-explorer.md
Am I within Free Tier?Free Tier APIreferences/free-tier.md
How do I reduce my bill?Cost Audit workflowreferences/cost-audit.md
How do I query detailed billing data?CUR 2.0 + Athenareferences/cur-athena.md
How do I optimize specific services?Per-service patternsreferences/service-optimization.md
How do I scope costs to a billing view?Billing ViewsSee Billing Views below

Common Tasks

Analyze costs by service

aws ce get-cost-and-usage \  --time-period Start=2026-03-01,End=2026-04-01 \  --granularity MONTHLY \  --metrics UnblendedCost \  --group-by Type=DIMENSION,Key=SERVICE

Default to UnblendedCost. Exclude Credits/Refunds with --filter '{"Not":{"Dimensions":{"Key":"RECORD_TYPE","Values":["Credit","Refund"]}}}'. End date is exclusive.

Run a cost audit

Read references/cost-audit.md for the full 7-step workflow: top cost drivers → month-over-month comparison → optimization recommendations → idle resources → commitment coverage → per-service quick wins → report.

Get right-sizing recommendations

Compute Optimizer requires opt-in first: aws compute-optimizer update-enrollment-status --status Active. Then read references/ec2-rightsizing.md for EC2 or the relevant resource-specific reference.

Look up service pricing

Read references/pricing-lookup.md for service codes and attribute filters. Common trap: Price List API service codes differ from Cost Explorer service names.

Billing Views

A billing view scopes cost and usage data to a specific slice of an account's billing (e.g., a billing group, custom view, or the default primary view). When the user wants to analyze costs through a particular billing view, add --billing-view-arn to supported API calls.

Discover available billing views

aws billing list-billing-views \  --billing-view-types PRIMARY CUSTOM BILLING_GROUP

Requires billing:ListBillingViews permission.

Use a billing view with Cost Explorer

aws ce get-cost-and-usage \  --time-period Start=2026-03-01,End=2026-04-01 \  --granularity MONTHLY \  --metrics UnblendedCost \  --group-by Type=DIMENSION,Key=SERVICE \  --billing-view-arn arn:aws:billing::ACCOUNT_ID:billingview/BILLING_VIEW_ID

Create a budget scoped to a billing view

In the --budget JSON, include the BillingViewArn field:

aws budgets create-budget --account-id ACCOUNT_ID \  --budget '{    "BudgetName": "TeamX-Monthly",    "BudgetLimit": {"Amount": "1000", "Unit": "USD"},    "TimeUnit": "MONTHLY",    "BudgetType": "COST",    "BillingViewArn": "arn:aws:billing::ACCOUNT_ID:billingview/BILLING_VIEW_ID"  }'

API support for --billing-view-arn

Supports --billing-view-arnDoes NOT support it
ce get-cost-and-usagece get-reservation-coverage
ce get-cost-and-usage-with-resourcesce get-reservation-utilization
ce get-cost-forecastce get-savings-plans-coverage
ce get-usage-forecastce get-savings-plans-utilization
ce get-dimension-values
ce get-tags
ce get-cost-comparison-drivers
budgets create-budget (in budget JSON)

Troubleshooting

ErrorCauseFix
ValidationException on Cost ExplorerWrong dimension key (e.g., CHARGE_TYPE instead of RECORD_TYPE)Use RECORD_TYPE for charge type filtering
Empty results with filterFilter value doesn't match exactlyCall GetDimensionValues first to get valid values
AccessDeniedException on hourly dataHourly granularity not enabledEnable in Cost Explorer preferences
Account not registered on Compute OptimizerNot opted inRun update-enrollment-status --status Active
Budgets API fails outside us-east-1Budgets requires us-east-1Set --region us-east-1
Cost Explorer Total empty with GroupByBy design — totals excluded when groupingMake separate call without GroupBy, or sum grouped results using a script
AccessDeniedException on list-billing-viewsMissing permissionUser needs billing:ListBillingViews permissions
ValidationException with --billing-view-arnAPI doesn't support billing views, or malformed ARNCheck the API support table above; ARN format is arn:aws:billing::ACCOUNT_ID:billingview/VIEW_ID
Budget shows UNHEALTHY health statusBilling view access revoked or view deletedCheck HealthStatus.StatusReason in describe-budget output; ensure billing:GetBillingViewData is granted

Additional Resources

  • AWS Cost Management User Guide: https://docs.aws.amazon.com/cost-management/
  • AWS Pricing Calculator: https://calculator.aws/
  • Compute Optimizer User Guide: https://docs.aws.amazon.com/compute-optimizer/
  • Well-Architected Cost Optimization Pillar: https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/

모든 파일

0개 파일

aws-billing-and-cost-management 설치

스킬 파일을 다운로드하여 .claude/skills/ 디렉터리에 압축을 풀어주세요.

ZIP 다운로드

저장소를 클론하고 스킬 파일을 프로젝트에 복사하세요.

git clone https://github.com/aws/agent-toolkit-for-aws/blob/main/skills/core-skills/aws-billing-and-cost-management/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

복사 복사
빠른 설정: skill 폴더를 .claude/skills/로 복사하면 Claude가 해당 스킬을 자동으로 감지하여 사용합니다.

관련 스킬

Cloudflare Manager
업데이트 된 시간 2026년 6월 29일
pinecone
업데이트 된 시간 2026년 6월 29일
azure-setup-guide
업데이트 된 시간 2026년 6월 29일
sentry-architecture-variants
업데이트 된 시간 2026년 6월 29일
OR