TestForge Blog

Cloud 비용 절감 전략 — AWS/GCP 월 30% 줄이는 실전 방법

클라우드 비용을 실제로 절감한 방법들. Reserved Instance, Spot, 스토리지 최적화, 네트워크 비용까지 항목별 절감 전략.

TestForge Team ·

클라우드 비용의 구성

대부분의 서비스에서 비용 구성은 다음과 같습니다.

항목비중
EC2/VM 인스턴스40~60%
RDS/DB15~25%
스토리지 (S3/EBS)10~15%
네트워크 (데이터 전송)5~15%
기타 서비스5~10%

인스턴스 비용이 가장 크므로 여기부터 시작합니다.

1. Reserved Instance / Savings Plans

On-Demand 대비 40~70% 절감.

On-Demand m5.xlarge (서울): $0.214/h = $155/월
1년 Reserved (선결제 없음): $0.136/h = $99/월 → 36% 절감
1년 Reserved (전액 선결제): $0.113/h = $82/월 → 47% 절감

전략:

  • 베이스라인 트래픽 → Reserved
  • 피크 트래픽 → On-Demand 또는 Spot
  • 미래 불확실 → Savings Plans (인스턴스 타입 변경 가능)

2. Spot Instance 활용

중단 허용 워크로드에서 70~90% 절감.

# Kubernetes Spot 노드 그룹 (EKS)
- name: spot-workers
  instanceTypes: ["m5.xlarge", "m5a.xlarge", "m4.xlarge"]  # 다양한 타입
  spot: true
  taints:
  - key: "spot"
    value: "true"
    effect: "NoSchedule"

Spot 적합 워크로드:

  • CI/CD 빌드 작업
  • 배치 처리, 데이터 파이프라인
  • 머신러닝 학습 (체크포인트 저장)
  • 개발/스테이징 환경

3. 인스턴스 우측 조정 (Right-sizing)

실제로 많은 팀이 과잉 프로비저닝 상태입니다.

# AWS Cost Explorer → "Right Sizing Recommendations" 확인
# 또는 직접 측정

# 2주간 CPU 평균 사용률 조회 (AWS CLI)
aws cloudwatch get-metric-statistics \
  --namespace AWS/EC2 \
  --metric-name CPUUtilization \
  --dimensions Name=InstanceId,Value=i-xxxxxxxxx \
  --start-time 2026-03-11T00:00:00Z \
  --end-time 2026-03-25T00:00:00Z \
  --period 86400 \
  --statistics Average

CPU 평균 20% 이하 → 한 단계 아래 인스턴스로 다운사이징 검토.

4. S3 스토리지 클래스 최적화

S3 Standard:        $0.023/GB/월
S3 Standard-IA:     $0.0125/GB/월 (접근 빈도 낮을 때)
S3 Glacier Instant: $0.004/GB/월  (아카이브)
S3 Glacier Deep:    $0.00099/GB/월 (장기 보관)
# Lifecycle 정책으로 자동 전환
{
    "Rules": [{
        "Status": "Enabled",
        "Transitions": [
            {"Days": 30,  "StorageClass": "STANDARD_IA"},
            {"Days": 90,  "StorageClass": "GLACIER_IR"},
            {"Days": 365, "StorageClass": "DEEP_ARCHIVE"}
        ],
        "Expiration": {"Days": 2555}  # 7년 후 삭제
    }]
}

5. 네트워크 비용 절감

네트워크는 청구서 보기 전까지 모르는 비용입니다.

비싼 패턴:

  • EC2 → 인터넷: $0.09/GB
  • 리전 간 데이터 전송: $0.02/GB
  • AZ 간 데이터 전송: $0.01/GB (양방향)

절감 방법:

# 1. 같은 AZ 통신 유도 (AZ-aware routing)
# 2. CloudFront로 S3 직접 접근 대신 CDN 경유
# 3. VPC Endpoint로 S3/DynamoDB 인터넷 우회
aws ec2 create-vpc-endpoint \
  --vpc-id vpc-xxx \
  --service-name com.amazonaws.ap-northeast-2.s3 \
  --route-table-ids rtb-xxx

6. 개발/스테이징 환경 자동 셧다운

# Lambda + EventBridge로 밤 11시 중지, 아침 9시 시작
# 하루 14시간 절감 → 월 58% 절감

# Terraform으로 태깅 기반 자동화
resource "aws_autoscaling_schedule" "stop_dev" {
  scheduled_action_name  = "stop-dev"
  min_size              = 0
  max_size              = 0
  desired_capacity      = 0
  recurrence            = "0 14 * * MON-FRI"  # UTC 23:00 KST
  autoscaling_group_name = aws_autoscaling_group.dev.name
}

7. 비용 알림 설정 (필수)

# AWS Budget 알림
aws budgets create-budget \
  --account-id 123456789 \
  --budget '{
    "BudgetName": "monthly-limit",
    "BudgetLimit": {"Amount": "1000", "Unit": "USD"},
    "TimeUnit": "MONTHLY",
    "BudgetType": "COST"
  }' \
  --notifications-with-subscribers '[{
    "Notification": {
      "NotificationType": "ACTUAL",
      "ComparisonOperator": "GREATER_THAN",
      "Threshold": 80
    },
    "Subscribers": [{"SubscriptionType": "EMAIL", "Address": "team@company.com"}]
  }]'

절감 우선순위 요약

  1. Reserved/Savings Plans — 안정적인 기본 워크로드 즉시 적용
  2. 개발환경 자동 셧다운 — 즉각 50%+ 절감
  3. Right-sizing — CPU/메모리 사용률 확인 후 다운사이징
  4. Spot 도입 — CI/CD, 배치 워크로드
  5. 스토리지 Lifecycle — S3 구 데이터 Glacier 이전
  6. VPC Endpoint — S3/DynamoDB 네트워크 비용 제거