I am having a requirement where I need to use AWS lambda function to update a database export . You can imagine that I have a .sql export file which I want to import into a database, run number of sql queries on it and then export back into sql.
This is a daily activity and hence I want to have AWS lambda function doing it using cloudwatch cron scheduling.
I have following ideas to try :
- Compile MySQL just like we compile additional python extensions using docket mount /opt/lambda directory and run this operation on lambda amazon instance
- Spinning up an RDS and running the operations on it, destroying it when done
- Spinning up a t2-micro and running the operations on it, destroying it when done
I tried option 1 but it was not successful. Please suggest if you find any better idea please. Thank you in advance.