Setting up auto scaling from alarm based on SQS messages for fargate ECS

0

I would like to auto scale a container based on SQS messages in a queue. When I go through to the ECS service setup I try and select the auto scale option for ECS Services, but my list is empty. I have ECS clusters, services, and tasks, set up; but nothing is in the list. Clearly I am missing a configuration here but I can't find what it is I am missing. The auto scale is able to be set up for two existing metrics, CPU and memory, which is great. But I want this to scale based on messages visible in the SQS queue. I have probably misunderstood the use of this section, but if I could be pointed in the right direction that would be great.

ecs_auto_scale_service_missing

Can this be done through the console, or is it something I would have to configure through terraform?

Thanks

1 Answer
3
Accepted Answer

Hello,

There was a similar question a few months back. I can't link my response to it, but putting the link here to the question if that is of help to deal with the configuration and Infra as Code (CFN though): https://repost.aws/questions/QUctw_D1ykSbOaxjDRToVbkg/looking-for-an-ecs-eks-fargate-cloudwatch-sqs-example

What you might be missing is a Scaling Target associated with your ECS Service. You need to first define that with a min/max container for the service.

Hope this helps,

profile picture
answered a year ago
  • ah ok, thanks. I'll take a look at the scaling targets and configuring that to see if that works out. Thanks

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions