Search code examples
amazon-web-servicesamazon-ec2amazon-sqsautoscaling

How to scale my AWS EC2 instance using SQS backlogs in AWS cloudwatch?


I have an application which will consume the incoming requests from AWS SQS and perform the task on EC2 instance and give it back to my customer. When I try to use AWS AutoScaling by default it only shows to scaling with basic metrics like CPU metrics.

I've tried to scale manually but its not feasible for me, so I need help with setting up an auto scaling that will automatically scale based on my Queues in my SQS as my backlog for one EC2 instance is 5 messages it should scale with that


Solution

  • Have you tried to create an scaling policy with SQS's number of available messages and set the auto scaling?

    I've already wrote a blog for this you can find it here. EC2 scaling with SQS