Scrape Amazon CloudWatch metrics into Alibaba Cloud Managed Service for Prometheus by using Yet Another CloudWatch Exporter (YACE), a Prometheus-community exporter optimized for lightweight CloudWatch metric collection. This enables cross-cloud monitoring of AWS resources alongside Alibaba Cloud services in a unified Prometheus workspace.
How it works
YACE runs as a pod in your Container Service for Kubernetes (ACK) cluster and collects CloudWatch metrics through a three-stage pipeline:
Metric scraping: YACE periodically pulls metrics such as CPU utilization and disk I/O from Amazon Elastic Compute Cloud (Amazon EC2) instances through AWS APIs.
Format conversion: YACE transforms CloudWatch metrics into Prometheus-compatible format.
Endpoint exposure: YACE exposes an HTTP
/metricsendpoint on default port 5000. Managed Service for Prometheus automatically discovers and scrapes this endpoint.
Prerequisites
Before you begin, make sure that you have:
Step 1: Deploy YACE in an ACK cluster
Download the
values.yamlfile from the Helm chart repository and configure the following sections. Prometheus scrape annotations AWS authentication Use an AccessKey pair (recommended), a Kubernetes secret, or an IAM role. CloudWatch metric collection Configure only the products, metrics, and statistics you need. Amazon CloudWatch charges per metric API request.Note: The EC2 metrics above are for illustration. For a full list of AWS services that publish metrics to CloudWatch, see AWS services that publish CloudWatch metrics. Configure other products similarly.
podAnnotations: { prometheus.io/path: /metrics, prometheus.io/port: "5000", prometheus.io/scrape: "true" }aws: role: # Reference a Kubernetes secret that stores AWS credentials. # Fields: access_key (AccessKey ID), secret_key (AccessKey Secret), # and optionally security_token (session token). secret: name: includesSessionToken: false # Specify these directly only if you did not configure a role or secret. aws_access_key_id: aws_secret_access_key:config: |- apiVersion: v1alpha1 sts-region: us-west-1 # Must match the region of the AWS resource discovery: jobs: - type: AWS/EC2 # Product namespace (see https://github.com/prometheus-community/yet-another-cloudwatch-exporter) regions: - us-west-1 searchTags: # Filter instances by tag - key: scrapedEnable value: ^(ali)$ metrics: - name: CPUUtilization statistics: - Average - Minimum - Maximum period: 60 length: 600 - name: DiskReadOps statistics: - Sum - Average - Minimum - Maximum period: 60 length: 600 - name: DiskWriteOps statistics: - Sum - Average - Minimum - Maximum period: 60 length: 600 - name: DiskReadBytes statistics: - Sum - Average - Minimum - Maximum period: 60 length: 600Download the latest chart release and install it: Or install from the remote repository:
helm install -f values.yaml yace-exporter-cw \ ./prometheus-yet-another-cloudwatch-exporter-0.40.0.tgz \ -n aws-cloudwatchhelm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm install -f values.yaml yace-exporter-cw \ prometheus-community/prometheus-yet-another-cloudwatch-exporter \ -n aws-cloudwatch
Step 2: Enable automatic metric scraping
After YACE is running in your ACK cluster, enable default service discovery in Managed Service for Prometheus so it automatically scrapes the YACE /metrics endpoint.
Log on to the ARMS console. In the left-side navigation pane, click Integration Management.
Select the region where the ACK cluster is deployed. On the Container Service tab, click the target environment name.
Click the Metric Scraping tab. On the Default Service Discovery tab, click Enabled. The system now scrapes YACE metrics automatically.

Click the Self-Monitoring tab to confirm that a scraping task named
kubernetes-podshas been created. Anupstate indicates that metric scraping is active.
Step 3: Validate metrics
Click the Metrics Explorer tab and verify that metrics prefixed with aws_ are available.

Configure alerts and dashboards
To set up alerts and dashboards for these metrics, follow steps 3 and 4 in Monitor an Alibaba Cloud service.