aws exec command timeout error #9251
Replies: 1 comment 1 reply
-
|
The most common causes are: ECS Exec was not enabled on the service/task. You must enable Exec on the service (or run-task) and then start a NEW task after enabling it: aws ecs update-service Then force a new deployment (so new tasks start with Exec enabled): aws ecs update-service Missing IAM permissions. Both are required:
Networking prevents the task from reaching SSM endpoints. Your tasks must be able to reach Systems Manager endpoints over HTTPS (443). If tasks are in private subnets, they need:
If the “exec agent” stays in “RUNNING” and never becomes “ACTIVE”, that strongly points to the network/IAM prerequisites above (it can’t phone home). Also verify you are providing the required parameters (task and container): aws ecs execute-command Once Exec is enabled on the service, the task is restarted, IAM is correct, and the task can reach SSM endpoints, the Exec agent will show as ACTIVE and the command will work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using AWS exec command in my command prompt, when I am running the command I am getting the following error
The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.
An error occurred (TargetNotConnectedException) when calling the ExecuteCommand operation: The execute command failed due to an internal error. Try again later.
when I troubleshooter this error and checked in stack overflow as well, they mentioned ssm which when checked is enabled.
Another thing is that my exec agent is always in running state instead of Active.
can anyone who has encountered this issue before help?!
Beta Was this translation helpful? Give feedback.
All reactions