Tushar Lachman
Melbourne · RMIT ’27
CLOUD DEPLOYMENTRMIT · team

Cloud Music — AWS Web App, Deployed to EC2 and ECS

One backend, two deployment models, so the trade-off could be measured rather than argued.

Cloud Computing · 2026
WHY IT EXISTS

A login-and-subscriptions music application on AWS, built by a team of four. Three DynamoDB tables behind a Flask backend, artist images in S3, a serverless path through Lambda and API Gateway, and a static frontend — with the same backend deployed twice, once onto an EC2 instance and once as a container on ECS Fargate.

How it’s put together

L00
Python
L01
Flask
L02
boto3
L03
Docker
L04
AWS EC2
L05
ECS Fargate
L06
ECR
L07
Lambda
L08
API Gateway
L09
DynamoDB
L10
S3

Built with

PythonFlaskboto3DockerAWS EC2ECS FargateECRLambdaAPI GatewayDynamoDBS3
PERIOD
Cloud Computing · 2026
ROLE
Team of four

The hard parts

08 NOTES
1

The same Flask backend deployed twice — onto an EC2 instance and as a container on ECS Fargate — so the operational difference between a VM you patch and a task the platform replaces could be measured rather than argued about.

2

Three DynamoDB tables — login, music and subscriptions — with the music table carrying a local secondary index and two global secondary indexes so it can be queried by year, by artist and by album rather than only by its primary key.

3

The EC2 deployment runs Flask under gunicorn as a systemd service, so it survives a reboot rather than living in a terminal. An Elastic IP keeps the public URL stable across stop/start, and an instance profile grants DynamoDB and S3 access through the role instead of through keys baked into the image.

4

Provisioning is scripted in two halves that do different jobs — one script for first-time install, one for redeploying after a pull — because conflating them is how a deploy script quietly reinstalls the world every time.

5

The container path is the same application through ECR and ECS Fargate: a slim Python image with gunicorn on port 80, a task definition at 0.25 vCPU and 0.5 GB, and a service that holds a desired count of one and replaces the task when it dies. An Application Load Balancer sits in front with a health check on `/health`.

6

A parallel serverless path — four Lambda functions behind an API Gateway REST API with CORS on every method — so the same operations exist as containers, as a long-lived VM process and as functions, and the three can be compared rather than argued about.

7

Two S3 buckets serve the static frontend, one pointed at the EC2 backend and one at the ECS backend, identical but for a single `API_BASE` constant. It makes the decoupling literal: the same frontend, unchanged, in front of two completely different backend deployments.

8

One constraint worth naming, because it shaped the design: CloudFront was evaluated as the CDN in front of S3 and abandoned — the AWS Academy lab role has no permission to create a distribution. The bucket policy enforces HTTPS via `aws:SecureTransport` instead.

Want the parts that aren’t on this page — the architecture arguments, the things that broke, a live walkthrough?

NEXTExam Timetable Solver in Answer Set Programming