Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not scaling service #2

Open
yellenseram opened this issue Jan 9, 2017 · 1 comment
Open

Not scaling service #2

yellenseram opened this issue Jan 9, 2017 · 1 comment

Comments

@yellenseram
Copy link

I've a similar scaling policy defined but I see that it scales the Autoscaling group abut doesn't scale the tasks in the ECS service.

"MyAutoScaleUpPolicy" : { "Type" : "AWS::AutoScaling::ScalingPolicy", "Properties" : { "AdjustmentType" : "ChangeInCapacity", "AutoScalingGroupName" : { "Ref" : "MyAutoScalingGroup" }, "Cooldown" : "100", "ScalingAdjustment" : "1" } },
"MyAsCPUAlarmHigh": { "Type": "AWS::CloudWatch::Alarm", "Properties": { "EvaluationPeriods": "2", "Statistic": "Average", "Threshold": "75", "AlarmDescription": "Alarm if CPU>=75% or metric disappears indicating instance is down", "Period": "180", "AlarmActions": [ { "Ref": "MyAutoScaleUpPolicy" } ], "Namespace": "AWS/ECS", "Dimensions": [ { "Name": "ClusterName", "Value": { "Ref": "MyCluster" } } ], "ComparisonOperator": "GreaterThanOrEqualToThreshold", "MetricName": "CPUUtilization" } },

Any advice?

@pgarbe
Copy link
Owner

pgarbe commented Jan 9, 2017

There are two different kinds of scaling. The AutoScalingGroup (ASG) is used to scale the cluster, Application AutoScaling is used to scale an ECS service.

Here's a tutorial how to do it in the Console
http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service_autoscaling_tutorial.html
and this is the corresponding CloudFormation resource http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants