Reputation: 1008
Now I am going to configure AutoScaling for my web application on AWS. I have read several blogs and AWS documentation for a perfect solution of my AutoScaling.
Now I have an idea that I have to create AutoScaling policy (Scale Up and Scale Down) using "as-put-scaling-policy" command. Then I have to trigger the policy using "mon-put-metric-alarm" i.e. CloudWatch (High Alaram and Low Alaram). By this way I can configure AutoScaling for my application.
Again some blogs are describing to use "as-create-or-update-trigger". With this single command we can achieve the scaleup and scaledown action. eg:
as-create-or-update-trigger my-latency-trigger --auto-scaling-group sbsgroup --dimensions "LoadBalancerName=myloadbalancer" --measure Latency --period 60 --statistic Average --lower-threshold 0.25 --upper-threshold 0.75 --breach-duration 300 --lower-breach-increment=-1 --upper-breach-increment 1 --namespace "AWS/ELB" --unit Seconds
Now I have one confusion that should I use CloudWatch Alarms to trigger instances or as-create-or-update-trigger. Please suggest me. Or give me a guide if my findings are wrong.
Upvotes: 1
Views: 213
Reputation: 4309
Use the CloudWatch alarms - as-create-or-update-trigger has been deprecated and only there for backwards compatibility.
From http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-trigger.html
Important
Triggers are a deprecated feature of Auto Scaling. We recommend that you switch from using triggers to using Auto Scaling policies and alarms. For more information, see Configuring Auto Scaling in the Auto Scaling Developer Guide.
Upvotes: 1