1 Answer
- Newest
- Most votes
- Most comments
0
This will depend on what task networking mode you're using. If you're using Bridge/Host the traffic will come from the underlying EC2 instance, which won't correspond with the security group of the ECS task. A good way to test connection errors and where the connection is being stopped would be VPC Reachability Analyzer.
answered a year ago
Relevant content
asked 2 years ago

I'm assuming you are using ECS on EC2, not Fargate...can you confirm? If so, what Task networking mode are you using? (AWSVPC, BRIDGE, or HOST)?
@AWS-User-5227227 Were you able to resolve this issue? I have the same issue, where I am trying to connect to a DB on EC2 from ECS - without success.