[ECS] [request]: ECS Service Connect should dynamically update `/etc/hosts` when new services are registered
- 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**
Add support for dynamically updating `/etc/hosts` (or equivalent service discovery data) in running ECS tasks. When new services or tasks become available, existing tasks should automatically resolve them without requiring redeploys.
**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?**
In ECS clusters, **service discovery depends on startup order**:
**Example:**
- `service-b` starts first → `service-a` can reach it.
- `service-a` starts later → `service-b` cannot reach `service-a` until redeployed.
ECS Service Connect doesn’t refresh `/etc/hosts` or DNS mappings after startup, so new services aren’t discovered dynamically.
This breaks the expectation of **dynamic service discovery** and forces **manual redeploys** to sync service information.
**Are you currently working around this issue?**
No, but we are considering to use HashiCorp Consul to overcome this issue. Which we rather not because it adds complexity and requires additional resources to run.
**Additional context**
N/A
**Attachments**
Users requesting this feature or wondering why it does not exist:
- https://repost.aws/questions/QU41_DRa-vQau6x2Jkc1cF0A/why-doesn-t-ecs-service-connect-register-new-services-properly
- https://stackoverflow.com/questions/77340374/aws-ecs-fargate-service-connect-not-updating-etc-hosts
Contributor guide
Research direction
No repository files, tests, or entry points are identified; this is a request for AWS ECS Service Connect behavior. Start by reviewing the linked AWS and Stack Overflow reports and the current ECS Service Connect documentation. Done would mean newly registered services are discoverable by running tasks without redeployment, with the intended /etc/hosts or DNS behavior defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100