- Newest
- Most votes
- Most comments
Hello.
If it is not an ECS network problem, the IAM policy required for the task roll may be missing, as described in the document below.
https://repost.aws/knowledge-center/ecs-error-execute-command
There is also a tool called Amazon ECS Exec Checker, so I recommend that you use it to troubleshoot.
https://github.com/aws-containers/amazon-ecs-exec-checker
Other reason too, was:
When hosting tasks that use the awsvpc network mode on Amazon EC2 Linux instances, your task ENIs aren't given public IP addresses. To access the internet, tasks must be launched in a private subnet that's configured to use a NAT gateway. For more information, see NAT gateways in the Amazon VPC User Guide. Inbound network access must be from within a VPC that uses the private IP address or routed through a load balancer from within the VPC. Tasks that are launched within public subnets do not have access to the internet.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking-awsvpc.html
Relevant content
- asked a year ago
