[ECS] [bug]: Exec into all containers when pidMode=task
- 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**
https://repost.aws/questions/QUbsgWD4yERDuphXDKOWbNFA/ecs-execute-command-not-working-for-pid-mode-task
> At this time, the behavior of Amazon ECS is non-deterministic with respect to enableExecuteCommand when pidMode is set to task. The AWS SSM agent (which powers the feature) will be running in one of the containers only, but right now you cannot specify which container is the one in which it will run, nor can you specify that you want it to run in all of them.
It would be extremely useful to be able to exec into all containers for debugging.
**Which service(s) is this request for?**
Fargate, ECS
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Currently, when deploying a task with sidecar containers, it is impossible to debug issues in a given container unless it's specified as the first one (and from the accepted answer, that is not even a guarantee). Specifically, I'm running an agent container that collects process-level metrics, and the agent has subcommands that I would like to run to assist in debugging.
**Are you currently working around this issue?**
No current workaround.
**Additional context**
Anything else we should know?
**Attachments**
If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)
Contributor guide
Assessment
This issue has not been assessed yet.