“message”:“Server selection timed out after 30000 ms”,“reason”:{“type”:“ReplicaSetNoPrimary”,“servers”:{},“stale”:false,“compatible”:true,“heartbeatFrequencyMS”:10000,“localThresholdMS”:15,“setName”:“atlas-uhi03q-shard-0”}
This is error I am receiving when I connect to mongo atlas instance from ECS tasks (EC2 instance running on private subnet). Runs well when I run this application from localhost. I have also enabled VPC peering and IP under network access is open to the world. Cannot figure out the issue. Appreciate some help here.