(aws-ecs-patterns): unable to set DesiredCount to zero
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
The ApplicationLoadBalancedFargateService construct rejects an attempt to set a DesiredCount of zero, however this is valid and supported in the underlying `AWS::ECS::Service` resource.
Common use cases for this:
- I want to "suspend" a service, particularly if it's a headless consumer with background worker tasks.
- During development of a new cluster with a new image, I want to deploy the cluster and supporting infrastructure without attempting to start the Docker image, because I don't want a slow startup attempt, with multiple retries and a lengthly rollback of the entire cluster every time I debug an issue with the image starting up.
### Environment
- **CDK CLI Version :** 2.0.0-rc.21 (build f35f136)
### Other
---
This is :bug: Bug Report
Contributor guide
Research direction
Start by locating the ApplicationLoadBalancedFargateService construct and the validation around DesiredCount, then compare its behavior with the underlying AWS::ECS::Service resource. Confirm that synthesizing a service with DesiredCount set to zero succeeds while existing positive values continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100