Question: I need to write multiple arrays (3,3) on the same file and read them one by one.
It’s the first time I use Python. Help me, please

Answer: 
You can easily connect to MongoDB without Spring.

There are a [lot of tutorials](https://www.mongodb.com/blog/post/getting-started-with-mongodb-and-java-part-i) out there which will help you.

For using it inside lambda, make sure to

* package all your dependencies correctly (e.g. use the [maven shade plugin](https://maven.apache.org/plugins/maven-shade-plugin/))
* handle your connections manually, as your application is not running continuously. That's not a trivial task, but there are also a lot of [sources online how to do this](https://blog.webiny.com/using-aws-lambda-to-create-a-mongodb-connection-proxy-2bb53c4a0af4).

As this is SO, you should try to do your first implementation yourself & if you're facing issues, please post your code and you'll get further support!
added below maven dependency in pom.xml

```
  <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongo-java-driver</artifactId>
            <version>2.12.3</version>
  </dependency>

```

> 
> written below code in handler to update query in mongoDB .
> 
> 
> 

```
@Override
    public Object handleRequest(Object o, Context context) {

        System.out.println("welcome to lambda function yeh.!!!");
        try {
            MongoClient mongo = new MongoClient("localhost", 27017);
            DB db = mongo.getDB("test");
            DBCollection col = db.getCollection("contact");
            System.out.println("data count" + col.count());

            BasicDBObject setValue = new BasicDBObject();
            BasicDBObject query = new BasicDBObject();
            query.put("contacts.mobileNo", "7090909090");
            setValue.put("contacts.$.userId", "userId12121212");
            BasicDBObject set = new BasicDBObject("$set", setValue);
            col.updateMulti(query, set);
            //close resources
            mongo.close();

        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

```