Install ubuntu-mate-desktop without asking for input

I'm creating AWS EC2 instances with Ubuntu 20.04 to record my online classes using OBS. As desktop enviroment I'm using ubuntu-mate-desktop as after trying some desktop enviroments this one seems to work pretty good (I'm open to recommendations of course!)

When I launch the instance I run a script that is supposed to install everything needed, and one of the thigs the script does is: sudo apt-get install ubuntu-mate-desktop -y, the problem is that it always asks if I want to use gdm3 or lightdm and it stays on hold, thus stopping the script. How can I tell that I want gmd3, so it doesn't stop the entire script?

Also, I think I'm installing many things that I don't really need, is there any package that just installs ubuntu mate with the essentials?

Thank you for answering