Skip to content

Metric will not update CloudFormation for changed unit #4716

@sbstjn

Description

@sbstjn

If you change a Metric unit in a CloudWatch Dashboard/Widget, the aws-cdk will not generate new CloudFormation resources when title is changed.

Reproduction Steps

First, deploy the dashboard with a widget and metric, then change the metric's unit and deploy again.

dashboard.addWidgets(
  new GraphWidget({
    title: 'A: B',
    width: 12,
    left: [
      new Metric({
        label: 'Duration',
        metricName: 'Duration',
        statistic: 'Average',
        // unit: Unit.MILLISECONDS,
        namespace: 'AWS/Lambda',
        dimensions: {
          FunctionName: foo.functionName
        }
      })
    ]
  })
)

Environment

  • CLI Version : 1.14.0
  • Framework Version: 1.14.0
  • OS :
  • Language : TypeScript

Other


This is 🐛 Bug Report

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions