AWS based solution of simple video drive.
Part of a CS degree course (EASS) final project.
You can find more of this course porjects here.
The user functionalities which are currently supported include:
🔜 Create Users
💎 Upload / Delete your videos.
💎 Control whether your videos are private or public so others can watch them.
💎 Watch yours / others public videos.
💎 Explore videos of other users.
🔜 MVP
Quick demonstration of video upload & usage.
demonstration.mp4
This diagram is intended to show the relationship between the system components in the case of system-wide usage.
Note: In order to better understand the diagram below, the async operations are synchronized.
As a result, the time intervals on the diagram are out of true proportions.
To read more about the API Web Server Design, click here the service directory will open with the readme file just below the source code.
-
Docker - is needed to build images.
-
Terraform - is being used for provisioning.
-
AWS CLI - is required for RDS Schema creation as part of deployment.
-
AWS Account - deployment is going to request for cloud resources from AWS and therefore, an account is required.
-
AWS Route53 Hosted zone /w Domain - deployment step includes:
- Certificate creation for Cloudfront and domain for frontend.
- Certificate creation for HTTPS connection to the Web server's Load balancer.
Thus, to create & validate this certificate automatically, first, a valid domain should be registered.
Route53 Domain registration step-by-step guide (zone will be created automatically):
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html
First, navigate to the deployment directory:
# from root directory
foo@bar:~ (root) $ cd deployment
Run:
# will download necessary plugins
foo@bar:~ (deployment) $ terraform init
Next, from the deployment directory, to deploy:
Make sure the length of your app name does not exceed 18 bytes, as it is used as an identifier in some resources that restrict the length of their identifier.
# During future deployments of an existing cluster,
# You can use the db_mode patch (or none),
# And fill the dll file with the relevant SQL commands.
foo@bar:~ (deployment) $ ./terraform.sh --command apply \
--aws_access_key <AWS_ACCESS_KEY> \
--aws_secret_key <AWS_SECRET_KEY> \
--app_name <APP_NAME> \
--domain <REGISTERED ROUTE53 DOMAIN> \
--db_mode init
🪨 Web Server service simplicity: Add G.C Service, for atomic delete operation (S3, RDS)
🪨 Cost: Split New video processing Lambda to smaller compute functions (and big one ONLY for the ffmpeg step, which is the most expensive one) while calling the smaller specific functions in parallel
🪨 Robustness: Add System-Wide test suite for B.B "Result" tests
🪨 Upload Performance: Enable S3 transfer acceleration
🪨 Streaming Performance: Use CloudFront to stream videos instead of S3 directly, for caching
🪨 Security and Scale: Users & Authentication based on JWT
🪨 Security: Add some shared Auth logic to API Web Server and WSS Server to validate JWT so the GUI cannot send invalid requests to either of them
🪨 Processing: Add Celery/Some Pipeline processing of new videos for multi-resolution support
🪨 Processing: Extract N video frames for videos thumbnails to appear on video hover (on GUI)
🪨 Dev Experience: Add some Jump host on EC2 (access using ssh), with access to private RDS
Project owner: