Created
December 10, 2017 17:02
-
-
Save li0nel/403c973b2c1355af082e650f6102cb1d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
ScaleUpPolicy: | |
Type: AWS::AutoScaling::ScalingPolicy | |
Properties: | |
AdjustmentType: ChangeInCapacity | |
AutoScalingGroupName: | |
Ref: asGroup | |
Cooldown: '1' | |
ScalingAdjustment: '1' | |
CPUAlarmHigh: | |
Type: AWS::CloudWatch::Alarm | |
Properties: | |
EvaluationPeriods: '1' | |
Statistic: Average | |
Threshold: '10' | |
AlarmDescription: Alarm if CPU too high or metric disappears indicating instance is down | |
Period: '60' | |
AlarmActions: | |
- Ref: ScaleUpPolicy | |
Namespace: AWS/EC2 | |
Dimensions: | |
- Name: AutoScalingGroupName | |
Value: | |
Ref: asGroup | |
ComparisonOperator: GreaterThanThreshold | |
MetricName: CPUUtilization |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment