I am attempting to gain shell level access from a windows machine to a Linux ECS Task in an AWS Fargate Cluster via the AWS CLI (v2.1.38) through aws-vault.
The redacted command I am using is
aws-vault exec my-profile -- aws ecs execute-command --cluster my-cluster-name --task my-task-id --interactive --command "/bin/sh"
but this fails with this output
The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.
Starting session with SessionId: ecs-execute-command-0bc2d48dbb164e010
SessionId: ecs-execute-command-0bc2d48dbb164e010 :
----------ERROR-------
Unable to start shell: Failed to start pty: fork/exec C:/Program: no such file or directory
I can see that ECS Exec is enabled on this task because an aws describe shows the following.
It appears that its recognising the host is a windows machine and attempting to initialise based on a variable that is windows specific.
Is anyone able to suggest what I can do to resolve this.