Skip to content

Commit

Permalink
fix: Dashboard name cannot contain spaces #82
Browse files Browse the repository at this point in the history
  • Loading branch information
hoegertn committed May 5, 2021
1 parent aecee73 commit 7fceb2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/constructs/monitoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class Monitoring extends cdk.Construct {
super(scope, id);

this.dashboard = new cloudwatch.Dashboard(this, 'Dashboard', {
dashboardName: `${props.apiName}-${props.stageName}`,
dashboardName: `${props.apiName}-${props.stageName}`.replace(/[^\w-]/g, '-'),
});

this.apiErrorsWidget = new cloudwatch.GraphWidget({
Expand Down

0 comments on commit 7fceb2a

Please sign in to comment.