Set up Lambda, which reads sqs-queue every minute and decides to start or stop aws-fargate tasks.
-
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs.html#SQS.Queue.attributes -> ApproximateNumberOfMessages
import boto.sqs c = boto.sqs.connect_to_region('us-east-1') queue = c.lookup('myqueue') attr = queue.get_attributes()
-
https://lobster1234.github.io/2017/12/03/run-tasks-with-aws-fargate-and-lambda/
-
https://stackoverflow.com/questions/53860449/schedule-aws-ecs-fargate-to-start-and-stop-tasks
-
https://docs.aws.amazon.com/de_de/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html
-
pipeline https://docs.aws.amazon.com/de_de/AmazonECS/latest/developerguide/ecs-cd-pipeline.html
- Use Serverless Framework for lambda function
- use Cloudformation for ECR deploy and Fargate Definition -> show docs
- script for docker build and deploy