Created
September 2, 2020 20:36
-
-
Save georgmao/195845b63af0adb287cec8fb92b0c20b to your computer and use it in GitHub Desktop.
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
MyTargetTrackingScalingPolicy: | |
Type: AWS::ApplicationAutoScaling::ScalingPolicy | |
Properties: | |
PolicyName: utilization | |
PolicyType: TargetTrackingScaling | |
ScalingTargetId: !Ref MyScalableTarget | |
TargetTrackingScalingPolicyConfiguration: | |
TargetValue: 0.70 # Any value between 0 and 1 can be used here | |
# PredefinedMetricSpecification: | |
# PredefinedMetricType: LambdaProvisionedConcurrencyUtilization | |
CustomizedMetricSpecification: | |
Dimensions: | |
- Name: FunctionName | |
Value: !Ref ApiFunction | |
- Name: Resource | |
Value: !Sub "${ApiFunction}:live" | |
MetricName: ProvisionedConcurrencyUtilization | |
Namespace: AWS/Lambda | |
Statistic: Maximum | |
Unit: Count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment