Quantcast
Channel: Active questions tagged mongodb-atlas - Stack Overflow
Viewing all articles
Browse latest Browse all 271

Why Should I Encapsulate MongoDB Atlas in a AWS EC2 Cluster Instead of Connecting From My App via URL?

$
0
0

I'm building my first app from scratch, and I've decided to use MongoDB as the main DB.I've set up a MongoDBAtlas Instance, along with my Python app in AWS ElasticBeanstalk and with Docker. Now I'm trying to connect the app to MongoDBAtlas, so looked up some tutorials, and found one that actually set Peer connecting on the MongoDBAtlas Instance, and then deploys that instance to a new AWS EC2 Cluster, which ElasticBeanstalk accesses via VPC/Security Group rules.

Why is the tutorial teaching all of that AWS stuff for MongoDBAtlas, when I can just add the following URL access in my Python app?

client = MongoClient("mongodb+srv://<username>:<password>@trialcluster.mongodb.net")

I could just make different DBs per environment and have the connection URL change accordingly using env variables, no?


Viewing all articles
Browse latest Browse all 271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>