AWS Lambda Function that will manage the length of collaborative Spotify playlists. Whenever playlist exceeds length old tracks will be moved to an archive playlist.
Spotify App Credentials - Redirect URI can be anything e.g http://127.0.0.1:10888
Playlist IDs - You must be Owner of collaborative playlists
AWS CLI credentials file - for terraform deployment
Fill secrets terraform.tfvars, set playlist lengths in app.py, add multiple playlists if required.
Get .cache file - see Spotify Auth section
Copy .cache file into src/ folder
Run "pip3 install spotipy -t ./"
terraform init && terraform plan
terraform apply
- Run the script locally so the user can sign in once - create auth.py script
- In the local project folder, you will find a file .cache
- Copy this file to your project folder on AWS
- It should work (check Token expiry date, adjust schedule accordingly)