Create Fargate service that starts at 0 and scale upon trigger by SQS eventbridge

0

I have a function hosted in a container on Fargate that needs to be activated by an SQS message via EventBridge. I am trying to setup the container in an ECS cluster as a service so the EventBridge works. When setting it up it seems to want to run the task straight away. I would like to have it sat there inactively and then turned on by the EventBridge. This would also require scaling up to 100 or more concurrent runs. Can you advise on what settings would achieve this.

2 Answers
0

Hello.

Perhaps the configurations described in the documentation below may be helpful.
This configuration uses SQS CloudWatch metrics to scale ECS.
By using this, it is possible to start an ECS task when messages accumulate in SQS.
https://aws.amazon.com/jp/blogs/containers/amazon-elastic-container-service-ecs-auto-scaling-using-custom-metrics/

profile picture
EXPERT
answered 4 months ago
0

Despite being a Serverless offering, Fargate is still a container (which doesn’t scale to zero) so it may trigger the task execution the first time.

Check this out for inspiration and troubleshoot https://repost.aws/questions/QUWzWBso4ySf--xcke9Ww3XQ/what-needs-to-be-done-to-make-event-bridge-invoke-a-fargate-task-when-file-added-to-s3

profile picture
EXPERT
answered 4 months ago

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