I recently created my first AWS web application using elastic beanstalk and the MERN (MongoDB, Express, React, NodeJS) stack and now I need to query my database daily to trigger emails.
Initially I was thinking about just creating a hook in my web service that handles the query+email logic since I already have all the neccessary models/connections in my web service and would just need a batch job once a day to call that web service hook but it would need to send credentials and call it via https.
Alternatively, I could just re-code all of my smtp/database models & connections in a separate batch program to run the query and send the emails.
Which option to you think is better/possible with AWS without using a new standalone EC2 instance? Would AWS Batch or Lambda make better sense? I need something that schedules these db queries+emails at the same time daily.