AWS Lambda and MongoDB

I am new to AWS Lambda and interested in trying it. I have a MongoDB instance that I want to connect through the AWM lambda function. How can I connect to my Mongo instance? I cannot load pymongo on AWS Lambda, so how can I get this to work in the Lambda function?

client = MongoClient()
client = MongoClient("mongodb://xxxxxx:27017 username user --password")
+4
source share
1 answer

MongoClient can be used to connect to MongoDatabase from Lambda.

MongoClientURI mongoClientURI = new MongoClientURI(mongoURl);
MongoClient mongoClient = new MongoClient(mongoClientURI);
MongoDatabase db = mongoClient.getDatabase(mongoDB);
+1
source

Source: https://habr.com/ru/post/1649097/


All Articles