A scraper for Suno.com that creates and downloads songs using AWS (Fargate & ECR for scraping and S3 for storing Chrome profiles), Twilio for Suno authentication and Supabase for storing songs and updating records (e.g outstanding credits on all Suno accounts used by the scraper, song data).
Before you begin, ensure you have the following installed on your machine:
Follow these steps to deploy the scraper to AWS Fargate:
aws ecr create-repository --repository-name suno-music-scraper
aws ecr get-login-password --region your-region-here | docker login --username AWS --password-stdin aws-account-id.dkr.ecr.your-region-here.amazonaws.com
docker build -t suno-music-scraper .
docker tag suno-music-scraper:latest aws-account-id.dkr.ecr.your-region-here.amazonaws.com/suno-music-scraper:latest
docker push aws-account-id.dkr.ecr.your-region-here.amazonaws.com/suno-music-scraper:latest
Update Parameters.ContainerImage.Default
in fargate-docker-scraper.yaml
or use the following command:
aws cloudformation deploy \
--template-file fargate-suno-scraper.yaml \
--stack-name fargate-suno-scraper \
--capabilities CAPABILITY_IAM \
--parameter-overrides \
ContainerImage="aws-account-id.dkr.ecr.your-region-here.amazonaws.com/suno-music-scraper:latest" \
ContainerPort=80 \
TaskCpu=2048 \
TaskMemory=4096
To update your Fargate setup:
- Create a changeset:
aws cloudformation create-change-set --stack-name fargate-suno-scraper --template-body file://fargate-suno-scraper.yaml --change-set-name my-change-set --capabilities CAPABILITY_NAMED_IAM
- Review the changes:
aws cloudformation describe-change-set --change-set-name my-change-set --stack-name fargate-suno-scraper
- Execute the changeset:
aws cloudformation execute-change-set --change-set-name my-change-set --stack-name fargate-suno-scraper
To deploy code changes to ECR:
docker build -t suno-music-scraper .
docker tag suno-music-scraper:latest aws-account-id.dkr.ecr.your-region-here.amazonaws.com/suno-music-scraper:latest
docker push aws-account-id.dkr.ecr.your-region-here.amazonaws.com/suno-music-scraper:latest
To remove the entire CloudFormation stack:
aws cloudformation delete-stack --stack-name fargate-suno-scraper
Check the deletion status:
aws cloudformation describe-stacks --stack-name fargate-suno-scraper