-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws ecs execute-command TargetNotConnectedException #6456
Comments
Hi @grepsedawk, Sorry to hear you're having trouble. To clarify, your issue is not related to this one: This ended up being related to needing a writable filesystem: aws-containers/amazon-ecs-exec-checker#21 (comment) I might need to ping the ECS team to look into this more if not. |
Nope! It's a read-write file system! |
I'm experiencing exactly the same issue. Just like OP, I have granted all required permissions to ECS task and IAM role. Read-write file system. ExecuteCommandAgent running. |
@mateuszwieloch does https://github.com/aws-containers/amazon-ecs-exec-checker/blob/main/check-ecs-exec.sh say everything is good to go for you as well? |
@grepsedawk It's a little complicated answer. The tool is showing To be precise, my organization has AWS Organization SCP rules that limit users to certain regions and the ecs-exec-checker tool currently doesn't pass in RequestedRegion in the call to IAM permission checker. Once I manually added the region, the rules passed. |
Just checking in here, I've reached out to the ECS team, waiting to hear back. |
Cool beans! |
I never set up routes for my containers to talk out. (In this case, NAT rules). |
|
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
When I run
aws ecs execute-command
it results in:However, the issue seems different than previous issues. When I check for exec status via https://github.com/aws-containers/amazon-ecs-exec-checker/blob/main/check-ecs-exec.sh it shows it should be working, but I get still get TargetNotConnectedException.
CLI version: aws-cli/2.2.43 Python/3.8.8 Linux/5.11.0-7620-generic exe/x86_64.pop.20
To Reproduce (observed behavior)
Steps to reproduce the behavior
Expected behavior
Connect to ecs container using exec
Logs/output
The text was updated successfully, but these errors were encountered: