Closed RomanIzvozchikov closed 7 months ago
Thanks for reaching out. Could you please try running the ECS task with --enable-execute-command to see if it would help solve this issue? If not, can you please provide the below information for further investigation?
@ziwangj thanks a lot for your support! I found the root cause of this issue. I didn't added Security Group rule that permits outbound traffic from ECS Service. This security group is applied to ECS Service.
Hello!
I am running ECS cluster on EC2 instances. I have started ECS service that created ECS task. I am trying to connect to ECS task using
aws ecs execute-command
command, but it fails with this exception:EC2 instance type: t4g.small EC2 instance AMI: ami-0c6ec2a0a1beaee8c EC2 instance SSM agent version: 3.2.2303.0
My ECS task is configured with a Task role, that contains required permissions:
ECS Exec is enabled in my service:
Session manager plugin is installed
I don't have any red lines when I execute check-ecs-exec.sh script.
I can connect to the instance that hosts my ECS task using
aws ssm start-session
command:I cannot connect to my container task using
aws ssm start-session
command.I noticed that Task role created for ECS Task has never been used (contains '-' in 'Last activity' field in AWS console).
Please help me to solve this problem. Any help and mentions are welcome!