Connect to ECS Task

0

I have setup my ECS cluster using FARGATE (serverless). Can I connect, through terminal, to a task inside a cluster to make some troubleshooting? My cluster is available on a private subnet reached through a load balancer.

1 回答
3
已接受的回答

Hello,

For sure, you can connect to your ECS Fargate task using Amazon ECS Exec. With Amazon ECS Exec, you can directly interact with containers without needing to first interact with the host container operating system, open inbound ports, or manage SSH keys. You can use ECS Exec to run commands in or get a shell to a container running on an Amazon EC2 instance or on AWS Fargate [1]. Refer to the documentation on how to use the ECS Exec for debugging[1].

[1] - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html

AWS
Olawale
已回答 1 年前
profile picture
专家
已审核 1 年前
profile pictureAWS
专家
已审核 1 年前
  • Thank you Olawale! What if my tasks are already launched but with "enableExecuteCommand" set to false? How can I re-enable them?

  • @Mohamad, you will need to create a new task with "enableExecuteCommand" set to true.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则