Skip to content

[Week 4] L1-006 답안 제출 #23

@wsxchoi

Description

@wsxchoi

Week

4

Scenario ID

L1-006

Problem Identification

  • 8 out of 10 CloudWatch log groups have retention_days=0 (logs stored forever)
  • ~60GB/month ingestion with no expiry → ~$2/month cumulative storage cost per group member

Root Cause

  • Metrics show stable 100GB/day ingestion (720 data points)
  • Cost report shows $189/month CloudWatch spend vs $144/month with retention policies
  • 4.8TB accumulated storage costs ($144/month) vs unbounded growth

Proposed Solution

  1. Set retention_days=90 for 8 problematic log groups
  2. Remove 2 existing 90-day retention groups (tv4ha6, xy0p7b)
  3. Implement log retention policy automation

Estimated Monthly Savings (USD)

45

Optimized Terraform

provider "aws" {
  region = "us-east-1"
}

resource "aws_cloudwatch_log_group" "no_retention_ingestion_2gb" {
  count = 8
  name   = "no_retention_ingestion_2gb-${count.index}"
  retention_days = 90
}

resource "aws_cloudwatch_log_group" "retention_90d" {
  count = 2
  name   = "retention_90d-${count.index}"
  retention_days = 90
}

Attached Reports

analysis_report.md
(Files committed to submissions/ directory)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions