A program for periodically updating Wilt user's play histories.
This is intended to run on AWS Lambda using CloudWatch to trigger updates.
To build a packaged zip that contains the built program, run:
This will create a zip called
This can then be uploaded to S3 and connected to Lambda.
index.js is the
Lambda handler and currently logs all output from the Swift program and the
handler returns an empty string on completion.
You'll need to copy your credentials file at
You'll need to set environment variables
SPOTIFY_CLIENT_SECRET in the Lambda console.
BIGQUERY_PROJECT_ID is now also used for the Firebase project ID,
so you'll need to ensure these exist under the same project within Google
Cloud. These should be separated into separate environment variables at some
You'll need to create a BigQuery table called
You'll need to create a table called
play_history (BigQuery): user_id, date, artists, name, primary_artist, track_id
users (FireStore): access_token, expires_at, refresh_token
- Some sort of exponential backoff if requests start failing (in case Spotify bans me)