Skip to content

CloudWatch Dashboard template broken - missing ApplicationName dimension in metrics #70

@RobersonPontes

Description

@RobersonPontes

Description

The CloudWatch Dashboard CloudFormation template (cloudformation/emr-serverless-cloudwatch-dashboard/emr-serverless-dashboard.yaml`)
does not display any metrics. All widgets show "No data available".

Root Cause

EMR Serverless now publishes metrics with an additional ApplicationName
(and JobName) dimension that the template does not include.

The template expects:
RunningJobs → [ApplicationId] CPUAllocated → [WorkerType, CapacityAllocationType, ApplicationId] WorkerCpuAllocated → [WorkerType, CapacityAllocationType, ApplicationId, JobId]

But EMR Serverless actually publishes:
RunningJobs → [ApplicationName, ApplicationId] CPUAllocated → [WorkerType, ApplicationName, CapacityAllocationType, ApplicationId] WorkerCpuAllocated → [WorkerType, ApplicationName, CapacityAllocationType, JobName, ApplicationId, JobId]

In CloudWatch, metrics with different dimension sets are completely
different metrics, so the dashboard finds no matching data.

Steps to Reproduce

  1. Create an EMR Serverless Spark application
  2. Run any Spark job
  3. Deploy the dashboard template with the ApplicationID parameter
  4. All widgets show "No data available"
  5. Confirm with:
aws cloudwatch list-metrics \
  --namespace "AWS/EMRServerless" \
  --metric-name "RunningJobs" \
  --dimensions Name=ApplicationId,Value=<your_app_id> \
  --output json
Output shows ApplicationName dimension is present but not referenced in the template.

Environment
Region: us-east-1
EMR Serverless (7.2)
Template: cloudformation/cloudwatch-dashboard/emr-serverless-dashboard.yaml
Suggested Fix
Add ApplicationName as a CloudFormation parameter
Include ApplicationName dimension in all metric references
Example fix for direct metrics:

// Broken
["AWS/EMRServerless", "RunningJobs", "ApplicationId", "${ApplicationID}"]

// Fixed
["AWS/EMRServerless", "RunningJobs", "ApplicationName", "${ApplicationName}", "ApplicationId", "${ApplicationID}"]
Example fix for Metrics Insights queries:

-- Broken
SELECT SUM(WorkerCpuAllocated) 
FROM SCHEMA("AWS/EMRServerless", ApplicationId, CapacityAllocationType, JobId, WorkerType)

-- Fixed
SELECT SUM(WorkerCpuAllocated) 
FROM SCHEMA("AWS/EMRServerless", ApplicationId, ApplicationName, CapacityAllocationType, JobId, JobName, WorkerType)
I have a working corrected template if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions