[ECS] [Deployment] [EC2]:BlueGreen Deployment with Capacity Provider UI issue and scaling out not working
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
@eyedean, Thanks for your comment, when I mention my capacity provider in appspec file code deploy is able to provision new instance if requirements are not met, but in this we are deploying app, but still the ecs service with blue/green deployment, when stopped(made desired no.of task to 0) and when started(changed no. of task in service to 1) with no existing ecs instances in cluster fails with error **"service was unable to place a task because no container instance met all of its requirements. Reason: No Container Instances were found in your cluster. For more information, see the Troubleshooting section"** .
I have default capacity provider for my cluster, same is used in service capacity provider section.
Capacity provider is working fine for Rolling deployment type, its able to spawn new instance when requirement is not met, facing this in B/G deployment only and I still faced that UI issue which you mentioned [disabled B/G deployment option when capacity provider provider is slected during service creation].
Workaround: When I update capacity provider to some other percentage[update action}, then once its updated then I'll take effect and add instance. I changed from 100 to 80%, it worked but when scale in happened with 0 task running in cluster, after regular interval the cloudwatch metrics peaked to 100 and launched new instances it went into a loop and had to manually update ASG to terminate instances.
@pavneeta Need help as running code deploy everytime when I need to start task will not help.
UI Issue:


_Originally posted by @Ruman1996 in https://github.com/aws/containers-roadmap/issues/713#issuecomment-981135399_
Contributor guide
Research direction
Start by reproducing the ECS blue/green deployment flow described here: scale the service to zero with no container instances, then scale it back to one using the cluster's capacity provider. Compare the result with rolling deployment and inspect the service-creation UI where blue/green is disabled. Done means capacity-provider scaling works reliably for blue/green deployments without repeated manual updates or instance loops.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100