Problem
A university project built by a team of three. Users browse albums and artists by genre, subscribe to them, and get notified when a new track is added. Admins manage artists, albums and tracks and upload audio files.
Architecture
Request path and notifications
-
Angular → API Gateway → Lambda
Python 3.9 functions, deployed with the Serverless Framework. Auth via Amazon Cognito; admins are members of the Admin group.
-
Lambda → DynamoDB
Tables: Music, Artists, Subscriptions, Notifications.
-
Lambda → S3
Presigned upload and play URLs.
-
Music table stream → notify_dispatcher
On every track write, look up subscribers of its album and artists and create notifications.
Single-table design
Tracks, albums and artists share one Music table.
| Entity | PK | SK |
|---|---|---|
| Track | CONTENT#<id> | METADATA |
| Album | ALBUM#<id> | ALBUM |
| Artist | ARTIST#<id> | ARTIST |
GSI1(GENRE#<genre>/TYPE#<type>#NAME#<name>) powers the discover page.GSI2(ALBUM#<id>/TRACK#<nnn>) lists an album’s tracks in order.
Key decisions
- One table, access-pattern-driven keys. The two GSIs answer the two main read paths (discover by genre, album track list) without scans.
- Notifications from the DynamoDB stream, not from the write path: adding a track doesn’t wait for subscriber fan-out.
- Presigned S3 URLs keep audio traffic off Lambda and API Gateway.
Known gaps
Documented honestly in the repo: every Lambda shares one broad IAM role, there are no real tests, and
GET /content scans the whole table.
Tech
Angular 20, Python 3.9 on AWS Lambda behind API Gateway, the Serverless Framework, Amazon Cognito, DynamoDB and S3.