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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南