0

I am told to create a Simple auto-scaling policy and using CloudWatch to trigger an increase in resources based on an alarm, I have created a target tracking scaling policy within my ASG and set the target value to 50 and with the alarm I have created a SNS to send me a notification to my email when it goes above the targeted value. But i'm not entirely sure if that's what was exactly asked for.

Is that what was meant by creating a 'Simple auto-scaling policy'? Any confirmation would be helpful

xRasp
  • 41
  • 1
  • 7
  • 3
    Why not just ask the person who requested it if this is what they want? – TTT Apr 08 '21 at 16:53
  • Takes days for a response so I just wanted a quick confirmation from someone experienced on here. – xRasp Apr 08 '21 at 17:06
  • I can't answer your question (I don't know that anyone can for sure), but the wording "trigger [something] based on an *alarm*" is kind of odd. I would say an *alarm* is usually for notifying humans. Normally you trigger something based on a set of criteria so that the thing happens automatically. Having done that, if you also have an alarm that it happened, I would consider that a bonus. ;) – TTT Apr 08 '21 at 17:12
  • 2
    @TTT scaling events in AWS use cloudwatch alarsm. That statement isn't odd at all. It's the way ELB scaling works by default. – jordanm Apr 08 '21 at 17:15
  • @jordanm Perfect. The "metrics" used for the trigger are actually [called "alarms"](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-steps). – TTT Apr 08 '21 at 17:40
  • @xRasp did you try reading up on CloudWatch alarms? As jordanm points out, this is the basics... – TTT Apr 08 '21 at 17:41

1 Answers1

0

As mentioned in the above comments, you need to confirm with whoever made that request.

You said:

I am told to create a Simple auto-scaling policy and using CloudWatch to trigger an increase in resources based on an alarm,

Therefore, you should create a simple auto-scaling policy which will trigger an increase (scale out) in resources.

Note: when you create a new policy, the alarms are automatically created and managed for you. Once created, you can edit them as well. When you delete the policy, the alarms get deleted. There is usually an alarm for the "scale up" (HIGH alarm) and for the "scale in" (LOW alarm). But, again, these are automatically created for you when you create the policy.

So, I'd say you just need to setup autoscaling for whichever service you're working on (EC2, ECS, other; this is not mentioned in your question) and assign a policy to that (autoscale based on a target metric: CPU, Memory, number of requests, etc or based on some other custom metric).

In the end, you'd want to test it by applying a load test and confirm that your service scales out when the load thresholds are breached (the threshold, how many datapoints must breach the threshold in what period of time: these are all defined in your policy and associated alarms automatically created after you setup the policy).

So, to answer the question, only the person who made the request can confirm but I'll say with a good certainty that the end goal is to increase the resources under load. So, no, the goal is not to send an email. You might want to send an email as well. But I would bet a benjamin that what's really wanted here is for you to make some service autoscale under load (scale out and scale in).

Pierre
  • 2,335
  • 22
  • 40