question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(aws-ecs-patterns): unable to set DesiredCount to zero

See original GitHub issue

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 Report

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
adrian-skybakercommented, Sep 8, 2022

so that no one can set 0 accidentially without reading the documentation:

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.

0reactions
dbartholomaecommented, Sep 8, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found