Skip to content

Instantly share code, notes, and snippets.

@li0nel
Last active January 1, 2019 06:03
Show Gist options
  • Save li0nel/62e010506d7f52321817d62604058952 to your computer and use it in GitHub Desktop.
Save li0nel/62e010506d7f52321817d62604058952 to your computer and use it in GitHub Desktop.
AlarmTopic:
Type: AWS::SNS::Topic
Properties:
Subscription:
- Endpoint: [email protected]
Protocol: email
CPUAlarmHigh:
Type: AWS::CloudWatch::Alarm
Properties:
EvaluationPeriods: '1'
Statistic: Average
Threshold: '50'
AlarmDescription: Alarm if CPU too high or metric disappears indicating instance is down
Period: '60'
# AlarmActions:
# - Ref: ScaleUpPolicy
AlarmActions:
- Ref: AlarmTopic
Namespace: AWS/EC2
Dimensions:
- Name: AutoScalingGroupName
Value: !Ref ECSAutoScalingGroup
ComparisonOperator: GreaterThanThreshold
MetricName: CPUUtilization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment