Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Cloudwatch - Autoscaling groups are not showing up when I try to create an alarm for SQS

I have a few queues on AWS that I would like to created alarms (when the amount of messages waiting to be interpreted are greater than 100 for example) and start another EC2 instance do help parse this messages quicker. However the group and action options continue empty/blocked even after I created groups using AWS CLI.

enter image description here I created the groups with these commands:

as-create-launch-config NomeDaInstancia --image-id ami-b75373de --instance-type t1.micro

as-create-auto-scaling-group AutoScalingGroupTeste --launch-configuration NomeDaInstancia --region us-east-1 --availability-zones us-east-1a,us-east-1c,us-east-1d --min-size 1 --max-size 2

Anybody can tell me what is wrong? Everything is running North Virginia (US_East) region.

like image 219
Vini.g.fer Avatar asked Nov 27 '13 13:11

Vini.g.fer


1 Answers

I recently experienced the same issue. If there is not a previous scaling policy created, the auto-scaling group will not appear in the alarms form. These are the steps I did:

  1. Create the alarm anyway, without the "auto-scaling" action.
  2. Go to EC2 > Auto Scaling Groups.
  3. Select the group and go to Scaling Policies tab.
  4. Manually create the auto-scaling Policy (Add Policy button) from this view (the Alarm you have created in step 1 should appear here).
  5. Go back to Cloudwatch and, after a few minutes, the auto-scaling group will be available in the alarms set-up form.
like image 95
edrabc Avatar answered Dec 09 '22 18:12

edrabc