I just started a new instance and deployed a very simple Java app to try to connect to MongoDB Atlas and the app is not able to connect. The same app is working fine locally. This is a general purpose instance in a VPC and not a classic. Is there a configuration to enable outbound calls? I checked the routing table and there is no rules to block any outbound calls. The attached image also show public IP, but I can't actually ping the server, but I can connect through ssh.
I have also tried assigning Elastic IP to an instance and that didn't work either.
Update:
It turned out the issue was with MongoDB for this case. Based on what I saw online, it let me to thing this was an issue with Amazon VPC, but it was actually an issue with the whitelist on Mongo DB Atlas. I didn't realize that was the case since connection from my local was working even though it's not supposed to.
You DO NOT need a NAT server to send an outbound call.