eddmann / serverless-fargate

Maintain long-running Fargate ECS tasks within your Serverless project
53 stars 22 forks source link

Make the service optional (tasks running on demand) #53

Open douglasgsouza opened 9 months ago

douglasgsouza commented 9 months ago

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).

mcshiz commented 6 months ago

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
mbescaser commented 6 months ago

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.

eddmann commented 4 months ago

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

sshakyaUR commented 2 months ago

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.