add flag to `aws ecs wait services-stable` to verify target group health on new service deployment
Describe the feature
aws ecs wait services-stable shows different behavior between a new service deployment and an update to an existing service
In a new service deployment, aws ecs wait services-stable returns (as documented) as soon the running task count equals the desired task count, without concern for the health of the target group. If the ECS image has a runtime error, you can get into a situation where you have the required number of tasks, the deployment is marked as successful, and then the tasks start to fail. In my particular case, because the deployment succeeded, CICD continued, and ended up altering a loadbalancer to route traffic to the failing target group, resulting in a 503 response code for a production service.
When updating a service, aws ecs wait services-stable only returns after both the task count is proper and the target group is verified as healthy.
Having a flag, e.g. --verify-target-group (or similar), that verified that the target group was healthy, on new deployments would be useful to me.
Use Case
This would make our CICD pipelines safer for new deployments, and reduce one possible source of downtime in production.
Proposed Solution
No response
Other Information
No response
Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
CLI version used
aws-cli/2.15.20 Python/3.11.6 Linux/5.15.133.1-microsoft-standard-WSL2 exe/x86_64.ubuntu.24 prompt/off
Environment details (OS name and version, etc.)
Ubuntu 24.04.1
Hello @mickray thanks for reaching out. In this case, waiter is calling Describe Services that have the same input parameters. The ECS currently does not have the flag --verify-target-group. Although, I reached out the ECS Service Team for this feature request and we don't have a timeline for the update. Moving forward and if the team decided for the feature, then please ensure to check our changelog for updates https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst. If you have any questions, please let me know. Thanks.
For Internal Tracking: P250606608
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.