Consider you are hosting your site using AWS S3. The site contains plain HTML files. You want to update your sitemap.xml as soon as your uploaded file goes into production. This repo helps you by automating the process.
- Create the virtual environment, install the requirements and activate the venv.
- Update your configurations in
config.json
. - Run the app using
python lambda_function.py
.
The app is configured in a way to be deployed using AWS lambda. Just push the app and create an AWS lambda function. Add a trigger to the function saying this has to be called when a new HTML file is to be uploaded in the bucket. This functions does the rest. Remember to add the trigger only for .html files or it might cause a recursive loop. The logs can be viewed using Cloudwatch.