Found the workaround thank you. The connection is actively being blocked based on IP address, as every ReplIt container runs the same software… Therefore the likely primary source of the issue is the Atlas firewall/fail2ban configuration. To test this story, we could ssh from ReplIt to an SSH server with a known working IPv4 address and reverse port forward port 22. We can then use that as a dynamic proxy for a local MongoDB connection.
Kubernetes nodes rarely have stable IP addresses in general, this should also sporadically affect Kubernetes users on GCP… Or anyone unfortunate enough to get a banned IP.
Long term, giving Atlas IPv6 support should make it easier to avoid this situation… That way one rogue customer plugin/container/wasm module/function on your Kubernetes Node doesn’t get the whole Node banned.
Would moving our Atlas cluster from AWS to GCP help?