Interview Prep/Monitoring & Observability/Kubernetes Monitoring, Scale & Cloud

How do you get CloudWatch metrics into Prometheus or Grafana, and what does it cost?

IntermediateConceptKubernetes Monitoring, Scale & Cloud
Answer

Three options:

  1. Grafana CloudWatch datasource: queries CloudWatch on demand. Simple, no copying, but every panel refresh calls GetMetricData, which is billed per metric requested.
  2. Exporter: YACE (yet-another-cloudwatch-exporter) or the official cloudwatch_exporter polls the API and exposes Prometheus metrics. Lets you use PromQL and Alertmanager, but polling cost grows with metrics × dimensions × frequency, and data lags by several minutes.
  3. CloudWatch Metric Streams: push metrics continuously via Firehose to an HTTP endpoint or vendor. Billed per metric update; good for large accounts.
# YACE discovery job (excerpt)
discovery:
  jobs:
    - type: AWS/SQS
      regions: [eu-west-1]
      period: 300
      metrics:
        - name: ApproximateAgeOfOldestMessage
          statistics: [Maximum]

Scope by tags and namespaces; scraping "everything every minute" is a common surprise bill.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Kubernetes Monitoring, Scale & Cloud