Cannot access Cluster even with wide open setting

Hi. I’m trying to connect from AWS ECS task to MongoDB Atlas cluster. I see my connection are refused. I’ve whitelisted all the needed IP and right now even made it wide open (0.0.0.0/0) but still having this issue.

Any advice or guidance? It worked before))

UnhandledPromiseRejectionWarning: MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you’re trying to access the database from an IP that isn’t whitelisted. Make sure your current IP address is on your Atlas cluster’s IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/

Have you checked that the FW from AWS are open to allow traffic out to you MongoDB Atlas cluster? It could be that the traffic isn’t getting to the MongoDB cluster.

@Dmitriy_Solodukha just adding up to previous comment, you may want to check inbound and outbound connections for the firewall. It may be that the outbound connection to TCP port $MongoPort has to be opened. Probably port 27017 since you’re connecting to Atlas.