Skip to content

A Fargate scraper for Suno.com that generates and downloads songs

Notifications You must be signed in to change notification settings

stefanionescu/suno-music-scraper

Repository files navigation

Suno Music Scraper

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).

Prerequisites

Before you begin, ensure you have the following installed on your machine:

AWS ECR & Fargate Deployment Guide

Follow these steps to deploy the scraper to AWS Fargate:

1. Create an ECR Repository

aws ecr create-repository --repository-name suno-music-scraper

2. Authenticate with ECR

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

3. Build and Tag the Docker Image

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

4. Push the Image to ECR

docker push aws-account-id.dkr.ecr.your-region-here.amazonaws.com/suno-music-scraper:latest

5. Deploy to Fargate

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

Maintenance and Updates

Updating the Fargate Deployment

To update your Fargate setup:

  1. 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
  1. Review the changes:
aws cloudformation describe-change-set --change-set-name my-change-set --stack-name fargate-suno-scraper
  1. Execute the changeset:
aws cloudformation execute-change-set --change-set-name my-change-set --stack-name fargate-suno-scraper

Updating the ECR Deployment

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

Cleanup

Deleting the Stack

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

About

A Fargate scraper for Suno.com that generates and downloads songs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published