PROG2003 Assignment 1

PROG2003 2023 T2 Cloud Systems Development
Assignment 1
Weight: 30% of your final mark
Due: Week 3 Monday (15 May 2023) at 23:59 PM QLD time
Specifications
Your task is to create a website that prints how much of the storage has been used for each student folder in an S3 bucket. To make the website dynamic, you need to create a Cloud9 app that would work as a “backend” for the website. Your submission will be evaluated based on:
• whether instructions have been followed;
• correct functionality;
• correct implementation; and
• comments inside the program
Getting Help
This assignment, which is to be completed individually, is your chance to gain an understanding of the fundamental concepts of listing and creating S3 objects on which later learning will be based. It is important that you master these concepts yourself.
Since you are mastering fundamental skills, you are permitted to work from the examples in the MySCU site or textbook, but you must acknowledge assistance from other textbooks or classmates. In particular, you must not use online material or help from others, as this would prevent you from mastering these concepts.
This diagram will help you understand where you can get help:
Encouraged Attribution Required Not acceptable Ask tutor
Be aware that if you do get help from one of the red sources, you will be reported for academic misconduct, which may have serious penalties. Please visit the following link for the guidelines: https://policies.scu.edu.au/download.php?associated=1&id=326&version=3
(Go to the next page)

PROG2003 2023 T2 Cloud Systems Development
ATTENTION: Assignment 1 must be completed in the UA-provided AWS account. Personal AWS accounts will not be accepted, and there will be a significant mark deduction. If your AWS account is not accessible for any reason and the marker cannot check your app, you will also lose
Overview: You need to create a static website that prints the folder usage information for each student folder in an S3 bucket. You will implement a Cloud9 app that will count the number of files, total file size(in MB), and remaining space (in MB) for each student folder. You will host the website within the same bucket and it has an index and error page. Please see below the example screenshots of the index page.
Example screen:
significant
marks. No excuse will be considered.
Details: The details of the assignment tasks are described below.
Part A: The static website (6 marks): You will use two HTML files – home.html and notfound.html, as the index and error page, respectively. Assume that your S3 bucket consists of folders for students. Each folder belongs to a student and the folder name must be the student ID (assume 7 digits). Each folder can consist of any files (web, text, image, excel, and others). Let’s assume students will not be able to add more files when his/her storage exceeds their limit. Assume that each student has 100 MB space in total. In each student folder, it can have some files and sub folders. You need to calculate all files in each student folder). For this assessment, you need to create at least 3 students with some files in each folder to demonstrate the functionality.
The home.html will print a count for existing files in each folder within an S3 bucket, calculate the total file size (in MB), and calculate the remaining space for each student.
Remember to configure the bucket with the appropriate “bucket policy” and “public access” for the public access of the website hosting. If you add or delete files in the bucket, the index page must print an updated list based on the existing files in the bucket.
The notfound.html will be very simple and will display a relevant error message, e.g., “page not found”. The error page appears upon entering the wrong/invalid URL.
Part B: The Cloud9 app (24 marks): You might be wondering how it would be possible for a static website to always display the current files in an S3 bucket. This is a dynamic behavior. You need to implement a Cloud9 app that will do the following each time it runs.
a. counting the number of files in each folder, calculate the total file size, and the remaining space. You need to write a separate method for listing objects, calculating the usage and remaining space.
b. preparing html content for the ‘home.html’. The ‘home.html’ will contain information about the list of students and their folder usage information. This information must be wrapped with HTML formatted string. You will need a separate method for this feature.
c. creating a new ‘home.html’ in the bucket, which will act as the index file for the website. You will need a separate method for this feature.

Programming Help
PROG2003 2023 T2 Cloud Systems Development
You need to execute the Cloud9 app each time before running the website so that the index page always displays the updated list of students and their folder usage information.
Requirements: Your website and Cloud9 app must fulfill the following requirements. You will lose marks otherwise.
• Your Cloud9 app must be named yourscuusernameA1App.
• You will use a single bucket for the whole assignment and its name must be
yourscuusername-a1-bucket.
• Your Cloud9 app must have three separate methods that are relevant to list
the students and their current ussage.
• Your Cloud9 app must use exception handling and loop(s).
• You must use AWS SDK v 2.x to implement the Cloud9 app.
• You must implement the assignment in the UA-provided AWS account, personal AWS account will not be accepted.
• You need to add detailed comments inside your source code.
Solution hints: Check the following hints for implementation.
• You will be taught how to list objects, retrieve their names and file size, which
will help you to implement the counting feature.
• You will also be taught about creating objects in an S3 bucket, which will help you implement the creating feature. For this assignment, you must create an HTML object (home.html) that will be served upon invoking the static website. A newly created object in S3 bucket has a content type of “application/octet”, by default. Such objects behave as attachments, and will not fulfil the purpose of a website. Do some research on any relevant methods to address the assessment problems (e.g., splitting a sentence to get a student ID).
• For the preparing feature, you need to wrap the file type and count with HTML code. You can use an unordered HTML list (

    …..

) to display the list. Check this link out: https://www.w3schools.com/html/html_lists_unordered.asp.
Submission checklist:
You have to zip the app project folder and submit it in Blackboard as well. The Blackboard submission list:
• A zipped app folder for the Cloud9 app (yourscuusernameA1App.zip). You can right-click and download your app from the Cloud9 interface.
The marker will access your AWS Academy workspace (provided by
check your app, and directly mark your app from there.
程序代写 CS代考 加QQ: 749389476
PROG2003 2023 T2 Cloud Systems Development
• A text file (named link.txt) containing the URL of your hosted static website.

PROG2003 2023 T2 Cloud Systems Development
Programming Help, Add QQ: 749389476