School of Science, Computing and Engineering Technologies Swinburne University of Technology
COS80001 – Cloud Computing Architecture Assignment 1 – Part A
Creating and deploying a Web Page
Due date: This assignment will be assessed by your tutor in your tutorial in Week 4. No submission is required. You must attend this demonstration to have your assignment assessed and be eligible to pass the unit.
Weighting: 5%, graded as pass/fail.
Prerequisite requirements:
• ACFLabs2&3.
• You will also need to create your own key pair and be able to access your EC2 instance via SSH
using utilities like PuTTY and/or WinSCP. For more details, see Remote Access to an EC2.pdf file. All supporting materials mentioned in this document can be found in the corresponding assignment
page on Canvas.
Objectives
This assignment has the following objectives:
1. Get familiar with the AWS management console.
2. Launch your own EC2 instance.
3. Deploy your first PHP web page (PhotoAlbum) on Apache web server on your EC2 instance.
AWS Accounts
You have a choice of accounts/environments you can use to complete the assignments in this unit.
1. Vocareum-managed environment (recommended): accessible through a classroom in Vocareum. Note that this is NOT the sandbox in ACA/ACF courses. This is a managed environment that allows your tutor to gain access to your AWS console so your work can be marked/troubleshooted. This class gives you US$100 credit. Use it carefully. This account is deleted at the end of the semester.
2. Regular AWS account (NOT recommended): new AWS accounts are eligible for a free tier. This gives you more freedom, but you need to be careful as you will be charged for the services if you go outside the free tier offering. Make sure to keep track of your AWS services usage (using Billing & Cost Management Dashboard) throughout the semester to avoid paying fees. This account is on-going, but some services are no longer free after 12 months. If you choose this option, you will need to create a (read-only) IAM user and provide its credentials to your tutor so they can mark the assignment.
COS80001 1
Code Help
School of Science, Computing and Engineering Technologies Swinburne University of Technology
TASK 1 – Launch your own Linux EC2 instance
Before launching an EC2 instance, a key pair is required for logging in to your instance in the future. For more details, see Remote Access to an EC2.pdf file. Then launch an EC2 instance from the AWS management console in US East (N. Virginia) us-east-1 region. It must have the following properties:
• Amazon Machine Image:
• Instance type:
Amazon Linux 2 AMI (HVM), SSD Volume Type
Use the script in Auto Setup EC2 with script.pdf file to
• Advanced Details – User data:
automatically set up and configure the Apache server, PHP, and MySQL at launch.
• New security group named “WebServer-SG” that allows only necessary traffic types (SSH, HTTP, HTTPS) to reach the instance from anywhere. Do not allow every traffic types.
Other configurations should be left as default such as default Virtual Private Cloud (VPC), default subnet, etc.
Note: In this introductory assignment you will create an EC2 Web server in the default VPC.
In general, the default VPC is suitable only for experimental / toy deployments, and its use is considered bad practice for production resources. In the next assignments, you will create your own secure VPC.
Allow a few minutes for the instance to launch and execute the commands in the above script, the Instance State and Status Check should change to ‘running’ and ‘2/2 checks passed’, respectively. After that, visit http://your.public.dns.amazonaws.com/phpinfo.php, if you see a welcome page, it means the EC2 instance, PHP, and Apache server have been installed correctly.
NOTE: Due to the pay-as-you-go pricing, the longer your instances run the more you pay. You are advised to stop the instances after each working session to save cost.
TASK 2 – Create a PHP website (Photo Album)
Create two PHP web pages (photouploader.php and photolookup.php) with user interfaces as illustrated in Figures 1 & 2. Feel free to individualise/style the web page as you wish.
Figure 1 – Photo uploader page (photouploader.php). The “Photo Lookup” hyperlink at the bottom should link to photolookup.php
Computer Science Tutoring
School of Science, Computing and Engineering Technologies Swinburne University of Technology
Figure 2 – Photo lookup page (photolookup.php). The “Photo Uploader” hyperlink at the bottom should link to photouploader.php
The directory structure of your website is described below. You can create additional HTML, CSS, PHP, JavaScript files if needed. The Apache HTTP server serves files located in a directory called Apache document root (/var/www/html); the cos80001 folder must be in the Apache document root folder. Follow the instructions in Remote Access to an EC2.pdf file to learn how to transfer files to a Linux EC2 instance.
NOTE: File and directory names in Linux are case sensitive.
NOTE: You are not required to implement the actual functionalities of the website at this stage. After having the website deployed on the Apache server on your instance, your web page should be accessible from anywhere on the Internet via this URL:
http://your.public.dns.amazonaws.com /cos80001/photoalbum/photouploader.php
You should try accessing your website from different devices/networks/browsers to make sure it works correctly.
/var/www/html/cos80001/
… AWS SDK, other support libraries
photoalbum/
photouploader.php
photolookup.php
… other PHP, HTML, CSS, JavaScript files
COS80001 1
程序代写 CS代考 加QQ: 749389476
School of Science, Computing and Engineering Technologies Swinburne University of Technology Demonstration
To be marked you are required to demonstrate your assignment in your allocated lab in Week 4.
NOTE: This is a formative assignment, which is an assignment designed to provide feedback and ensure you have mastered some basic techniques. If your assignment submission fails this time, you have one week to make corrections and resubmit to pass.
What happens if assignment submission is graded as a ‘fail’?
You will have to repeat the task and submit in the following week’s lab session. Students can repeat the task and submit for feedback again. If your submission is graded as ‘fail’ twice then you may fail this unit.
What happens if a student is unable to submit or demonstrate the assignment?
If you are unable to submit due to medical reasons, then a doctor certificate will have to be shown to the unit convenor. Under normal conditions, all students are expected to make a submission and demonstrate by the due date, otherwise the assignment is graded as a fail.
Requirements Checklist
The photouploader.php and photolookup.php pages are served from your EC2
instance and correctly displayed on a browser from anywhere.
COS80001 1