Ubuntu free tier is used for the demonstration in this video. There is no security implemented in this video. For example, MongoDB compass is able to connect to AWS EC2 instance without any password.
At this moment the Flask interface is just an example of how to get started on the work with Flask and MongoDb.