Akka Cluster on ECS Fargate

Hello

I am trying to run an akka cluster on AWS Ecs by Fargate. So far, not so good.

I start an instance without seeds
After 5 minutes, i check with the aws sdk the list of services and, since there isnt anything else running appart from myself, I become the cluster leader.

I start then a second instance, do the same thing. This time, this instance detect that there is a service running and tries to connect to its cluster.

I tried this configuration, on the first instance :
{
“remote”:{
“artery”:{
“bind”:{
“hostname”:“172.31.74.127”,
“port”:25520
},
“canonical”:{
“hostname”:“172.31.74.127”,
“port”:25520
}
}
}

Also this one

{
“remote”:{
“artery”:{
“bind”:{
“hostname”:“172.31.74.127”,
“port”:25520
},
“canonical”:{
“hostname”:“0.0.0.0”,
“port”:25520
}
}
}

Neither worked, it should be fairly straight forward but I must be missing something because i get this one the second instance :

12:59:01.574 [cms-api-akka.actor.default-dispatcher-14] WARN akka.stream.Materializer - [outbound connection to [akka://cms-api@172.31.74.127:25520], control stream] Upstream failed, cause: StreamTcpException: Tcp command [Connect(172.31.74.127:25520,None,List(),Some(5000 milliseconds),true)] failed because of akka.io.TcpOutgoingConnection$$anon$2: Connect timeout of Some(5000 milliseconds) expired

and then :

12:59:16.460 [cms-api-akka.actor.default-dispatcher-15] WARN akka.remote.artery.Association - Outbound control stream to [akka://cms-api@172.31.74.127:25520] failed. Restarting it. akka.remote.artery.OutboundHandshake$HandshakeTimeoutException: Handshake with [akka://cms-api@172.31.74.127:25520] did not complete within 20000 ms.

Happy to hear from someone who had this working :) Thank you for you help!