[ECS] [request]: capacity provider should periodically scan instances in ASG
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
The capacity provider is currently only accepting instances that the ASG started itself.
If we launch and attach an instance to the ASG, the capacity provider will ignore it and the instance won't have any tasks scheduled.
**Which service(s) is this request for?**
ECS
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
We're using ECS with AutoSpotting for automated Spot instance diversification and failover to on-demand instances.
AutoSpotting works by replacing instances in ASGs using Attach/Detach API calls. Spot instances are started outside of the ASG and then attached in order to replace on demand instances from the ASG.
The instances started by AutoSpotting and attached to the ASG are ignored by the capacity provider, and no tasks are scheduled on them.
We would like the capacity provider to automatically refresh the instances from the ASG, or to have an API to trigger such a refresh ourselves.
**Are you currently working around this issue?**
We're using the EC2 launch type but that can't scale the capacity of the ASG based on resource consumption in the cluster.
**Additional context**
-
**Attachments**
-
Contributor guide
Assessment
This issue has not been assessed yet.