Creating ec2 instances and installing mongoDB using automation
It's possible. I would use Terraform for creating the infrastructure on AWS and Ansible for provisioning. You will have to write .tf files and ansible-playbooks in order to do this. 

Just to let you know, if all 3 nodes are equal you should do the installation and provisioning once and then create an AMI to set up the rest. Maybe an autoscaling group is a possibility too. 

Keep in mind that AWS provides documentdb as document-oriented database as a service. It's not mongoDB but it's pretty similar (there are some functions mongo provides and docdb doesn't).