Reputation: 3218
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.
Upvotes: 1
Views: 1145
Reputation: 367
MongoDB Atlas actually now has VPC peering which will no longer require you to whitelist 0.0.0.0/0
https://www.mongodb.com/blog/post/introducing-vpc-peering-for-mongodb-atlas
Upvotes: 1
Reputation: 4012
Make sure your ACL's for that subnet allow 0.0.0.0/0
Make sure you can ping www.google.com from within the instance
Check your subnet routes and ensure that it has a route for 0.0.0.0/0
to the internet gateway.
Upvotes: 0