AWS ECS Fargate, container to container communication
I'm not sure if this is the answer, but it's worth checking, as I was caught out by this once.
A security group is a firewall around a single ENI (Elastic Network Interface). Each ENI effectively has a security group that filters communications from all other ENIs. There is no automatic communication between resources in a security group - you have to explicitly allow it.
The solution in this case is to allow ingress into the security group from the security group, by named security group. You obviously have to allow egress as well, this can be done with the an explicit rule that names the security group but from memory I think the default 0.0.0.0/0 would be sufficient - try it and see.