Skip to content

Latest commit

 

History

History
 
 

spotify-dynamodb

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Spotify DynamoDB (Music table)

This demo shows the difference in performance between a DynamoDB scan vs query. The table design is inspired by an example from AWS Technical Essentials course.

To create the table you can upload the template in the AWS Management Console or you can run the following command on the CLI:

aws cloudformation create-stack --stack-name Music --template-body file://spotify-dynamodb/template.yml

To import records you can use the import.py script. For this script you need to have configured Spotify API Client credentials:

export SPOTIFY_CLIENT_ID=0123456789abcdef0123456789abcdef
export SPOTIFY_CLIENT_SECRET=0123456789abcdef0123456789abcdef
python spotify-dynamodb/import.py

To show the performance difference you can run the following commands:

python spotify-dynamodb/performance.py Year 2010
python spotify-dynamodb/performance.py Song Strobe
python spotify-dynamodb/performance.py Artist deadmau5

Shout out to deadmau5 - Strobe