피드로 돌아가기
AWS ECS Fargate Cost Allocation: Why Your Per-Cluster Spend Shows as One Line
Dev.toDev.to
Infrastructure

SCAD 활성화를 통한 ECS Fargate 월 $29,000 비용의 테넌트별 가시성 확보

AWS ECS Fargate Cost Allocation: Why Your Per-Cluster Spend Shows as One Line

khimananda Oli2026년 5월 28일7intermediate

Context

멀티테넌트 SaaS 환경에서 9개의 ECS Fargate 클러스터를 운영하며 월 약 $29,000의 비용 발생. 단순히 Cost Allocation Tags를 활성화했음에도 불구하고 Cost Explorer 상에서 모든 비용이 단일 항목으로 집계되는 비용 추적 불가 현상 발생.

Technical Solution

  • 단순 Tag 활성화가 아닌 Payer Account 레벨의 Split Cost Allocation Data(SCAD) 설정 필수 적용
  • SCAD 활성화를 통한 ECS Task 레벨의 텔레메트리 데이터 수집 및 billing row에 태그 값 매핑 구조 구축
  • Billing Console의 Cost Management Preferences 내 ECS 포함 설정을 통한 데이터 파이프라인 정상화
  • Backfill tags 기능을 활용하여 최대 12개월 이전의 과거 비용 데이터 소급 적용
  • Terraform의 propagate_tags = "SERVICE" 설정을 통한 서비스 태그의 Task 레벨 전파 및 SCAD 정합성 확보
  • CUR 2.0 export와 splitLineItem 컬럼 활용을 통한 Athena 기반의 고정밀 비용 쿼리 환경 설계

- Payer/Management Account 권한으로 Billing Console 접속 여부 확인 - Cost Allocation Tags에서 aws:ecs:clusterName 및 aws:ecs:serviceName 활성화 상태 점검 - Cost Management Preferences 내 'Include Amazon Elastic Container Service' 체크 여부 확인 - 서비스 레벨 태그 사용 시 propagate_tags 설정이 Task까지 적용되었는지 검토 - 설정 변경 후 Cost Explorer 반영까지 24시간 대기 및 Backfill 실행

원문 읽기