|
54 | 54 | "MaxCapacity": 10,
|
55 | 55 | "MinCapacity": 1,
|
56 | 56 | "ResourceId": "service/default/web-app",
|
57 |
| - "RoleARN": "arn:aws:iam::012345678910:role/ApplicationAutoscalingECSRole", |
| 57 | + "RoleARN": "arn:aws:iam::012345678910:role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService", |
58 | 58 | "ScalableDimension": "ecs:service:DesiredCount",
|
59 |
| - "ServiceNamespace": "ecs" |
| 59 | + "ServiceNamespace": "ecs", |
| 60 | + "SuspendedState": { |
| 61 | + "DynamicScalingInSuspended": false, |
| 62 | + "DynamicScalingOutSuspended": false, |
| 63 | + "ScheduledScalingSuspended": false |
| 64 | + } |
60 | 65 | }
|
61 | 66 | ]
|
62 | 67 | },
|
|
152 | 157 | }
|
153 | 158 | ],
|
154 | 159 | "PutScalingPolicy": [
|
| 160 | + { |
| 161 | + "input": { |
| 162 | + "PolicyName": "cpu75-target-tracking-scaling-policy", |
| 163 | + "PolicyType": "TargetTrackingScaling", |
| 164 | + "ResourceId": "service/default/web-app", |
| 165 | + "ScalableDimension": "ecs:service:DesiredCount", |
| 166 | + "ServiceNamespace": "ecs", |
| 167 | + "TargetTrackingScalingPolicyConfiguration": { |
| 168 | + "PredefinedMetricSpecification": { |
| 169 | + "PredefinedMetricType": "ECSServiceAverageCPUUtilization" |
| 170 | + }, |
| 171 | + "ScaleInCooldown": 60, |
| 172 | + "ScaleOutCooldown": 60, |
| 173 | + "TargetValue": 75 |
| 174 | + } |
| 175 | + }, |
| 176 | + "output": { |
| 177 | + "Alarms": [ |
| 178 | + { |
| 179 | + "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca", |
| 180 | + "AlarmName": "TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca" |
| 181 | + }, |
| 182 | + { |
| 183 | + "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmLow-1b437334-d19b-4a63-a812-6c67aaf2910d", |
| 184 | + "AlarmName": "TargetTracking-service/default/web-app-AlarmLow-1b437334-d19b-4a63-a812-6c67aaf2910d" |
| 185 | + } |
| 186 | + ], |
| 187 | + "PolicyARN": "arn:aws:autoscaling:us-west-2:012345678910:scalingPolicy:6d8972f3-efc8-437c-92d1-6270f29a66e7:resource/ecs/service/default/web-app:policyName/cpu75-target-tracking-scaling-policy" |
| 188 | + }, |
| 189 | + "comments": { |
| 190 | + "input": { |
| 191 | + }, |
| 192 | + "output": { |
| 193 | + } |
| 194 | + }, |
| 195 | + "description": "The following example applies a target tracking scaling policy with a predefined metric specification to an Amazon ECS service called web-app in the default cluster. The policy keeps the average CPU utilization of the service at 75 percent, with scale-out and scale-in cooldown periods of 60 seconds.", |
| 196 | + "id": "to-apply-a-target-tracking-scaling-policy-with-a-predefined-metric-specification-1569364247984", |
| 197 | + "title": "To apply a target tracking scaling policy with a predefined metric specification" |
| 198 | + }, |
| 199 | + { |
| 200 | + "input": { |
| 201 | + "PolicyName": "cms75-target-tracking-scaling-policy", |
| 202 | + "PolicyType": "TargetTrackingScaling", |
| 203 | + "ResourceId": "service/default/web-app", |
| 204 | + "ScalableDimension": "ecs:service:DesiredCount", |
| 205 | + "ServiceNamespace": "ecs", |
| 206 | + "TargetTrackingScalingPolicyConfiguration": { |
| 207 | + "CustomizedMetricSpecification": { |
| 208 | + "Dimensions": [ |
| 209 | + { |
| 210 | + "Name": "MyOptionalMetricDimensionName", |
| 211 | + "Value": "MyOptionalMetricDimensionValue" |
| 212 | + } |
| 213 | + ], |
| 214 | + "MetricName": "MyUtilizationMetric", |
| 215 | + "Namespace": "MyNamespace", |
| 216 | + "Statistic": "Average", |
| 217 | + "Unit": "Percent" |
| 218 | + }, |
| 219 | + "ScaleInCooldown": 60, |
| 220 | + "ScaleOutCooldown": 60, |
| 221 | + "TargetValue": 75 |
| 222 | + } |
| 223 | + }, |
| 224 | + "output": { |
| 225 | + "Alarms": [ |
| 226 | + { |
| 227 | + "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmHigh-9bc77b56-0571-4276-ba0f-d4178882e0a0", |
| 228 | + "AlarmName": "TargetTracking-service/default/web-app-AlarmHigh-9bc77b56-0571-4276-ba0f-d4178882e0a0" |
| 229 | + }, |
| 230 | + { |
| 231 | + "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmLow-9b6ad934-6d37-438e-9e05-02836ddcbdc4", |
| 232 | + "AlarmName": "TargetTracking-service/default/web-app-AlarmLow-9b6ad934-6d37-438e-9e05-02836ddcbdc4" |
| 233 | + } |
| 234 | + ], |
| 235 | + "PolicyARN": "arn:aws:autoscaling:us-west-2:012345678910:scalingPolicy: 8784a896-b2ba-47a1-b08c-27301cc499a1:resource/ecs/service/default/web-app:policyName/cms75-target-tracking-scaling-policy" |
| 236 | + }, |
| 237 | + "comments": { |
| 238 | + "input": { |
| 239 | + }, |
| 240 | + "output": { |
| 241 | + } |
| 242 | + }, |
| 243 | + "description": "The following example applies a target tracking scaling policy with a customized metric specification to an Amazon ECS service called web-app in the default cluster. The policy keeps the average utilization of the service at 75 percent, with scale-out and scale-in cooldown periods of 60 seconds. ", |
| 244 | + "id": "to-apply-a-target-tracking-scaling-policy-with-a-customized-metric-specification-1569365036205", |
| 245 | + "title": "To apply a target tracking scaling policy with a customized metric specification" |
| 246 | + }, |
| 247 | + { |
| 248 | + "input": { |
| 249 | + "PolicyName": "alb-scale-out-target-tracking-scaling-policy", |
| 250 | + "PolicyType": "TargetTrackingScaling", |
| 251 | + "ResourceId": "service/default/web-app", |
| 252 | + "ScalableDimension": "ecs:service:DesiredCount", |
| 253 | + "ServiceNamespace": "ecs", |
| 254 | + "TargetTrackingScalingPolicyConfiguration": { |
| 255 | + "DisableScaleIn": true, |
| 256 | + "PredefinedMetricSpecification": { |
| 257 | + "PredefinedMetricType": "ALBRequestCountPerTarget", |
| 258 | + "ResourceLabel": "app/EC2Co-EcsEl-1TKLTMITMM0EO/f37c06a68c1748aa/targetgroup/EC2Co-Defau-LDNM7Q3ZH1ZN/6d4ea56ca2d6a18d" |
| 259 | + }, |
| 260 | + "ScaleInCooldown": 60, |
| 261 | + "ScaleOutCooldown": 60, |
| 262 | + "TargetValue": 1000 |
| 263 | + } |
| 264 | + }, |
| 265 | + "output": { |
| 266 | + "Alarms": [ |
| 267 | + { |
| 268 | + "AlarmARN": "TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca", |
| 269 | + "AlarmName": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca" |
| 270 | + } |
| 271 | + ], |
| 272 | + "PolicyARN": "arn:aws:autoscaling:us-west-2:012345678910:scalingPolicy:6d8972f3-efc8-437c-92d1-6270f29a66e7:resource/ecs/service/default/web-app:policyName/alb-scale-out-target-tracking-scaling-policy" |
| 273 | + }, |
| 274 | + "comments": { |
| 275 | + "input": { |
| 276 | + }, |
| 277 | + "output": { |
| 278 | + } |
| 279 | + }, |
| 280 | + "description": "The following example applies a target tracking scaling policy to an Amazon ECS service called web-app in the default cluster. The policy is used to scale out the ECS service when the RequestCountPerTarget metric from the Application Load Balancer exceeds the threshold.", |
| 281 | + "id": "to-apply-a-target-tracking-scaling-policy-for-scale-out-only-1569366080118", |
| 282 | + "title": "To apply a target tracking scaling policy for scale out only" |
| 283 | + }, |
155 | 284 | {
|
156 | 285 | "input": {
|
157 | 286 | "PolicyName": "web-app-cpu-gt-75",
|
|
179 | 308 | "output": {
|
180 | 309 | }
|
181 | 310 | },
|
182 |
| - "description": "This example applies a scaling policy to an Amazon ECS service called web-app in the default cluster. The policy increases the desired count of the service by 200%, with a cool down period of 60 seconds.", |
183 |
| - "id": "to-apply-a-scaling-policy-to-an-amazon-ecs-service-1470864779862", |
184 |
| - "title": "To apply a scaling policy to an Amazon ECS service" |
| 311 | + "description": "This example applies a step scaling policy to an Amazon ECS service called web-app in the default cluster. The policy increases the desired count of the service by 200%, with a cool down period of 60 seconds.", |
| 312 | + "id": "to-apply-a-step-scaling-policy-to-an-amazon-ecs-service-1470864779862", |
| 313 | + "title": "To apply a step scaling policy to an Amazon ECS service" |
185 | 314 | },
|
186 | 315 | {
|
187 | 316 | "input": {
|
|
210 | 339 | "output": {
|
211 | 340 | }
|
212 | 341 | },
|
213 |
| - "description": "This example applies a scaling policy to an Amazon EC2 Spot fleet. The policy increases the target capacity of the spot fleet by 200%, with a cool down period of 180 seconds.\",\n ", |
214 |
| - "id": "to-apply-a-scaling-policy-to-an-amazon-ec2-spot-fleet-1472073278469", |
215 |
| - "title": "To apply a scaling policy to an Amazon EC2 Spot fleet" |
| 342 | + "description": "This example applies a step scaling policy to an Amazon EC2 Spot fleet. The policy increases the target capacity of the spot fleet by 200%, with a cool down period of 180 seconds.\",\n ", |
| 343 | + "id": "to-apply-a-step-scaling-policy-to-an-amazon-ec2-spot-fleet-1472073278469", |
| 344 | + "title": "To apply a step scaling policy to an Amazon EC2 Spot fleet" |
216 | 345 | }
|
217 | 346 | ],
|
218 | 347 | "RegisterScalableTarget": [
|
|
221 | 350 | "MaxCapacity": 10,
|
222 | 351 | "MinCapacity": 1,
|
223 | 352 | "ResourceId": "service/default/web-app",
|
224 |
| - "RoleARN": "arn:aws:iam::012345678910:role/ApplicationAutoscalingECSRole", |
225 | 353 | "ScalableDimension": "ecs:service:DesiredCount",
|
226 | 354 | "ServiceNamespace": "ecs"
|
227 | 355 | },
|
|
240 | 368 | "MaxCapacity": 10,
|
241 | 369 | "MinCapacity": 1,
|
242 | 370 | "ResourceId": "spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3",
|
243 |
| - "RoleARN": "arn:aws:iam::012345678910:role/ApplicationAutoscalingSpotRole", |
244 | 371 | "ScalableDimension": "ec2:spot-fleet-request:TargetCapacity",
|
245 | 372 | "ServiceNamespace": "ec2"
|
246 | 373 | },
|
|
0 commit comments