serverless-fargate icon indicating copy to clipboard operation
serverless-fargate copied to clipboard

Make the service optional (tasks running on demand)

Open douglasgsouza opened this issue 2 years ago • 4 comments

I would like the plugin to enable all configuration but without creating the service in the cluster. Because it could be used to perform tasks on demand, such as (stepFunctions).

douglasgsouza avatar Feb 02 '24 16:02 douglasgsouza

setting service:desiredCount = 0 works

  vpc:
    subnetIds: ${file(configs/${self:provider.stage}.yml):vpc.subnets}
  tasks:
    get-tickets:
      image: ${file(configs/${self:provider.stage}.yml):fargate.image}
      executionRoleArn: !GetAtt task.Arn
      environment:
        BUCKET_NAME: ${file(configs/${self:provider.stage}.yml):BucketName}
        API_KEY_PATH:  /${self:provider.stage}/service/api-key
      service:
        desiredCount: 0

mcshiz avatar May 02 '24 20:05 mcshiz

https://github.com/eddmann/serverless-fargate/issues/53#issuecomment-2091527951 Unfortunately, this doesn't work for me. It still creates a service whenever I deploy it.

mbescaser avatar May 20 '24 17:05 mbescaser

So in this case you would like to just provision the AWS::ECS::TaskDefinition?

eddmann avatar Jul 12 '24 18:07 eddmann

I would like this feature also. I want to create a standalone Task definition that I run manually using a lambda function.

Setting desired count to 0 still creates a service for me.

sshakyaUR avatar Aug 30 '24 20:08 sshakyaUR