ScottBrenner/reddelete

Serverless Framework function that periodically deletes a user's Reddit comments below a defined threshold!

★ 4Forks 1PythonGitHub ↗Compare
redditserverless-framework

README

reddelete

Serverless Framework function that periodically deletes a user's Reddit comments below a defined threshold!

Usage

  1. Follow the Serverless Framework AWS - Installation guide to setup Serverless Framework and AWS credentials in your development environment.

  2. Set functions.reddelete.events.schedule in serverless.yml based on the Schedule Expressions for Rules guide (default is every six hours)

  3. Set functions.reddelete.environment in serverless.yml as follows:

    • REDDIT_CLIENT_ID: create an app on Reddit
    • REDDIT_CLIENT_SECRET: from Reddit app created above
    • REDDIT_USERNAME: Reddit username
    • REDDIT_PASSWORD: Reddit password
    • DELETE_THRESHOLD: Comments with score below this are deleted (default is 0)

    Suggested method for seting these values: Reference Variables using the SSM Parameter Store

  4. serverless deploy

  5. Done!


This function is based on AWS Python Scheduled Cron Example

Contributors

ScottBrennerdependabot[bot]snyk-bot

Issues