Skip to content

AWS Setup

David edited this page May 24, 2025 · 1 revision

Requirements

  • Aws Account

Setup

I've name my function Osrs-progress-webhook but you can name it whatever you want

  • Runtime should be Python 3.12

Pasted image 20250520210942

  • Click Create function which will take you to this page

Pasted image 20250520211129

  • Next you want to click the Upload from button

  • Select the Zipped function you downloaded earlier & Save.

  • Next click on configuration and the Environment variables tab

  • You want to add the following

The following two variables are required in order for the lambda function to work.

  • USERNAMES - this is a comma seperated list of usernames you want to track the progress of so Username1, Username2
  • WEBHOOK_URL - This is the URL you will need from discord that will be used to post to the channel you setup.

These next variables are optional

  • SEND_PLAYER_EMBED - This is if you want to see Individual Player progress in discord. If there is a lot of users in the usernames list then perhaps turn this off. This is set to either true or false. But is automatically on if not provided.
  • SEND_RANKING_EMBED - This is if you want to see the rankings between the usernames provided in the list. This is set to either true or false - But is automatically on if not provided.
  • SORT_BY - This is how the ranking embed is sorted, switch this to the metrics you are most interested in. - experience_gainsboss_gainsactivity_gains - Defaults to experience_gains
  • PERIOD this is how long the progress is tracked over. five_min dayweekmonth - Defaults to day It will only post gains within a days period of time by default.

Pasted image 20250520212428

Next click on the Test tab and the Test button, if everything has been set correctly you should see some messages appear in discord, in the appropriate channel you have selected. You can use this to configure the settings to your liking.

Next you want to add a trigger this will be used to run the lambda code at specific intervals

Pasted image 20250520212834

Click add trigger

  • Select EventBridge from the drop down
  • Configure the role name and description to what you want
  • I've set the function up so that it will trigger at 9:43 everyday. I used this website to help me create a cron time. The time AWS uses is in UTC
  • https://crontab.guru/

Pasted image 20250520214111

Warnings

It's important to mention that if you have a long list of people you will have to up the lambda run time from 3 seconds to something higher. You can do this in the configuration tab and under the General Configuration Pasted image 20250520212650

That's it you should see messages in discord for whenever you specified the messages to come through.

Pasted image 20250520214752

Clone this wiki locally