eddmann / serverless-fargate

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

make DesiredCount optional in CFN #56

Open Avadakedvr opened 5 months ago

Avadakedvr commented 5 months ago

An explicit/default DesiredCount of 1 in the CloudFormation template forces a scaled up service to scale down to 1 during re-deployments.

https://github.com/aws/aws-cdk/issues/3919

https://github.com/aws/aws-cdk/pull/12223

You should only set this value IF the user sets a desiredCount property, otherwise you should omit setting any value at all - a default of 1 will be used regardless for any newly deployed service and the current number of running tasks will be used for existing services, which is the desired behaviour.