Describe the feature
Currently, the SingleValueWidget in CDK-defined CloudWatch dashboards does not support live or auto-refreshing data. This limits its usefulness for operational monitoring of key metrics (e.g., errors, throttles, queue depth). Other widget types support near-real-time updates, but SingleValue widgets cannot be configured for this behaviour via CDK.
Use Case
I want to display a SingleValue widget on a dashboard that updates automatically to reflect near real-time metrics without manually refreshing the dashboard. For example:
import * as cloudwatch from 'aws-cdk-lib/aws-cloudwatch';
import * as cdk from 'aws-cdk-lib';
const dashboard = new cloudwatch.Dashboard(stack, 'MyDashboard');
dashboard.addWidgets(
new cloudwatch.SingleValueWidget({
metrics: [
new cloudwatch.Metric({
namespace: 'MyApp',
metricName: 'ErrorCount',
period: cdk.Duration.minutes(1),
}),
],
}),
);
Currently, this widget only shows a static snapshot of the metric, even if the dashboard refreshes.
Proposed Solution
Allow SingleValueWidget to optionally display live or near-real-time data.
Other Information
No response
Acknowledgements
AWS CDK Library version (aws-cdk-lib)
2.237.1
AWS CDK CLI version
2.1101.0
Environment details (OS name and version, etc.)
Mac OS Sonoma
Describe the feature
Currently, the
SingleValueWidgetin CDK-defined CloudWatch dashboards does not support live or auto-refreshing data. This limits its usefulness for operational monitoring of key metrics (e.g., errors, throttles, queue depth). Other widget types support near-real-time updates, but SingleValue widgets cannot be configured for this behaviour via CDK.Use Case
I want to display a SingleValue widget on a dashboard that updates automatically to reflect near real-time metrics without manually refreshing the dashboard. For example:
Currently, this widget only shows a static snapshot of the metric, even if the dashboard refreshes.
Proposed Solution
Allow
SingleValueWidgetto optionally display live or near-real-time data.Other Information
No response
Acknowledgements
AWS CDK Library version (aws-cdk-lib)
2.237.1
AWS CDK CLI version
2.1101.0
Environment details (OS name and version, etc.)
Mac OS Sonoma