Automating WhatsApp, Email and launching an AWS instance using Python
To create a program that performs the given below tasks upon recognizing a particular face —
- When it recognizes your face then :
-> It sends an email to your mail id.
-> And also a WhatsApp message to your friend or anyone else.
- When it recognizes another face, it can be your friend or family members face, it should do the following :
->Creates EC2 instance in the AWS.
-> Creates 5 GB EBS volume and attach it to the instance.
Let’s get to the task !
Part one : Building and Training a Face recognition model
For this we will be using the Haar Cascade Frontal Face Detector to train our model.
Done , now we can use this model to perform our tasks.
Part two : Automating WhatsApp , E-mail and AWS EC2 instance launching
- AWS CLI setup
For this refer the following -
- Python library called PyWhatKit should also be installed as given below functions will be used -
send_mail(email_sender: str, password: str, subject: str, message: str, email_receiver: str)
sendwhatmsg(phone_no: str, message: str, time_hour: int, time_min: int, wait_time: int = 20, print_wait_time: bool = True, browser: str = None)
Hence, in this way on the face being recognized the program emails and sends the WhatsApp message to the specified email and number respectively and in case it fails to recognize the face, it launches an EC2 instance in AWS along with creating a 5 GB EBS volume and attaches it to the instance.
GitHub Repository link for reference : https://github.com/AmimaShifa/Automating-Email-WhatsApp-and-launching-AWS-instance-using-Python/tree/main/task%206