(aws-ecs-patterns): unable to set DesiredCount to zero
See original GitHub issueThe 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 Report
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (5 by maintainers)
Top Results From Across the Web
QueueProcessingFargateService unable to set desiredCount ...
I checked and the value 0 is overwritten and the desiredCount is always ... (aws-ecs-patterns): unable to set DesiredCount to zero #16562.
Read more >aws-cdk/aws-ecs-patterns module - AWS Documentation
This will set the desiredCount of any service created by any of the following constructs to be undefined. ApplicationLoadBalancedEc2Service ...
Read more >aws-cdk.aws-ecs-patterns 1.3.0 - PyPI
This is a developer preview (public beta) module. Releases might lack important features and might have future breaking changes.
Read more >Application Load Balanced Fargate Service example in AWS ...
The next snippet uses the official AWS CDK Construct library for higher-level ECS Constructs (aws-ecs-patterns) to create the Application Load ...
Read more >Deploying a containerized web application with AWS Cloud ...
Level 0 – Creating infrastructure by hand. Your organization's ... What if something fails and ... @aws-cdk/aws-ecs: Create cluster to run application ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m sceptical this is actually a real problem the API needs to solve. Who is explicitly specifying zero accidentally? Or deliberately and being surprised with the result? Having used the underlying cfn resources which permit zero for many years in production, it’s never seemed remotely likely.
I personally would also prefer to set it to
0
, but this is a solution that would work for everyone and go with the design principles mentioned by the AWS team.