Skip to content

Commit

Permalink
fix(aws-cloudwatch): metric id should be started with a lowercase letter
Browse files Browse the repository at this point in the history
fixes aws#13434
  • Loading branch information
BLasan committed Mar 12, 2021
1 parent a4dcce2 commit 7e94566
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-cloudwatch/lib/alarm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class Alarm extends AlarmBase {
return dispatchMetric(metric, {
withStat(stat, conf) {
self.validateMetricStat(stat, metric);

const id = 'm_' + stat.metricName
if (conf.renderingProperties?.label == undefined) {
return dropUndefined({
dimensions: stat.dimensions,
Expand All @@ -283,7 +283,7 @@ export class Alarm extends AlarmBase {
stat: stat.statistic,
unit: stat.unitFilter,
},
id: stat.metricName,
id: id,
label: conf.renderingProperties?.label,
returnData: true,
} as CfnAlarm.MetricDataQueryProperty,
Expand Down

0 comments on commit 7e94566

Please sign in to comment.