This is a lambda function which queries an RDS database, writes the results to an Excel file, and saves the file to an S3 bucket.
- An AWS account
- An RDS database to run the queries against
- Permissions for RDS, Lambda, S3, and EventBridge (CloudWatch Events)
- Clone the repo
- Modify
lambda.py
to match your specific environment: database connection details, queries you want to run, name your Excel sheets, name the file, and specify the S3 bucket name. - If you wish to have this run on a schedule, add an EventBridge trigger and specify an interval number of days when this function is executed.
This function is very useful if you have a need to re-run the same SQL queries on a set schedule, like every week or two, or even every day. The Excel file generated could be useful to a business analyst to track any kind of change to your database: number of users, emails for a newsletter, telemetry, etc.
Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/MyGreatFeatureRequest
) - Commit your Changes (
git commit -m 'Add some features'
) - Push to the Branch (
git push origin feature/MyGreatFeatureRequest
) - Open a Pull Request