Created
April 5, 2021 17:05
-
-
Save jm42/6a13605e73e389e3e50a733e34f300e6 to your computer and use it in GitHub Desktop.
Example resource to create a CloudWatch Dashboard for an Alarm in CloudFormation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CloudWatchDashboard: | |
Type: AWS::CloudWatch::Dashboard | |
Properties: | |
DashboardName: !Sub ${AWS::StackName} | |
DashboardBody: !Sub | |
- | | |
{ | |
"periodOverride": "inherit", | |
"widgets": [ | |
{ | |
"type": "alarm", | |
"x": 0, | |
"y": 0, | |
"width": 12, | |
"height": 6, | |
"properties": { | |
"alarms": ["${ECSCPUUtilizationAlarmArn}"], | |
"title": "Cluster CPU Utilization" | |
} | |
} | |
] | |
} | |
- ECSCPUUtilizationAlarmArn: !GetAtt ECSCPUUtilizationAlarm.Arn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment